-
Notifications
You must be signed in to change notification settings - Fork 187
Prebundle src #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Prebundle src #476
Changes from 12 commits
0489c9f
ef40c8c
5bf2023
5261afe
fb7f867
c4db00d
e824cd9
c8cbd66
2e87cf9
e87fe12
acb5999
6b314cf
1259abc
742a945
92d7ddc
637c673
5193fa9
b2ae33f
da661f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'playroom': minor | ||
| --- | ||
|
|
||
| Improve user-side performance and install size by prebundling source |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| dist/ | ||
| app/ | ||
| cypress/videos/ | ||
| cypress/screenshots/ | ||
| cypress/plugins/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| cypress/plugins/ | ||
| cypress/fixtures/ | ||
| dist | ||
| app | ||
| pnpm-lock.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,13 @@ | |
| "bin": { | ||
| "playroom": "bin/cli.cjs" | ||
| }, | ||
| "main": "./dist/index.js", | ||
| "main": "./dist/index.cjs", | ||
| "module": "./dist/index.mjs", | ||
| "types": "./dist/index.d.ts", | ||
| "types": "./dist/index.d.cts", | ||
| "exports": { | ||
| ".": { | ||
| "import": "./dist/index.mjs", | ||
| "require": "./dist/index.js" | ||
| "require": "./dist/index.cjs", | ||
| "import": "./dist/index.mjs" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
|
|
@@ -20,7 +20,7 @@ | |
| ".babelrc", | ||
| "images", | ||
| "lib", | ||
| "src", | ||
| "app", | ||
| "utils", | ||
| "dist" | ||
| ], | ||
|
|
@@ -50,7 +50,7 @@ | |
| "format": "pnpm lint:eslint --fix && prettier --write '**/*.{js,md,ts,tsx}'", | ||
| "version": "changeset version", | ||
| "release": "pnpm package && changeset publish", | ||
| "package": "tsdown", | ||
| "package": "tsdown && tsdown --config ./tsdown.app.config.ts", | ||
| "test": "jest src lib", | ||
| "post-commit-status": "node scripts/postCommitStatus.js", | ||
| "deploy-preview": "surge -p ./cypress/projects/themed/dist", | ||
|
|
@@ -80,21 +80,8 @@ | |
| "@babel/parser": "^7.23.4", | ||
| "@babel/preset-env": "^7.20.2", | ||
| "@babel/preset-react": "^7.18.6", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @michaeltaranto I'd appreciate if you could take a hard look at the dependencies, if what I moved to devDeps makes sense, and if anything else could potentially be moved. A bit hard for me to judge, as I don't know what has been added and why. Also the webpack config and loaders, which I trimmed down - maybe something can be simplified further there as well.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont recall why we have a requirement for The Can all the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hadn't moved Types can indeed move to devDeps, will do so. |
||
| "@babel/preset-typescript": "^7.18.6", | ||
| "@base-ui/react": "^1.1.0", | ||
| "@capsizecss/metrics": "^3.5.0", | ||
| "@capsizecss/vanilla-extract": "^2.0.4", | ||
| "@soda/friendly-errors-webpack-plugin": "^1.8.1", | ||
| "@types/codemirror": "^5.60.5", | ||
| "@types/prettier": "^2.7.1", | ||
| "@types/react": "^18.0.0 || ^19.0.0", | ||
| "@types/react-dom": "^18.0.0 || ^19.0.0", | ||
| "@vanilla-extract/css": "^1.9.2", | ||
| "@vanilla-extract/css-utils": "^0.1.3", | ||
| "@vanilla-extract/dynamic": "^2.1.2", | ||
| "@vanilla-extract/integration": "^8.0.4", | ||
| "@vanilla-extract/sprinkles": "^1.5.1", | ||
| "@vanilla-extract/webpack-plugin": "^2.3.6", | ||
| "@zumer/snapdom": "^1.9.14", | ||
| "babel-loader": "^9.1.0", | ||
| "clsx": "^2.1.1", | ||
|
|
@@ -122,20 +109,31 @@ | |
| "scope-eval": "^1.0.0", | ||
| "sucrase": "^3.35.1", | ||
| "tinyglobby": "^0.2.12", | ||
| "typescript": ">=5.0.0", | ||
| "use-debounce": "^10.0.0", | ||
| "webpack": "^5.75.0", | ||
| "webpack-dev-server": "^5.0.2", | ||
| "webpack-merge": "^5.8.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@actions/core": "^1.10.0", | ||
| "@babel/preset-typescript": "^7.18.6", | ||
| "@capsizecss/metrics": "^3.5.0", | ||
| "@capsizecss/vanilla-extract": "^2.0.4", | ||
| "@changesets/changelog-github": "^0.5.1", | ||
| "@changesets/cli": "^2.28.1", | ||
| "@octokit/rest": "^19.0.5", | ||
| "@testing-library/cypress": "^10.1.0", | ||
| "@types/codemirror": "^5.60.5", | ||
| "@types/jest": "^29.2.4", | ||
| "@types/node": "^18.11.9", | ||
| "@types/node": "^20.19.30", | ||
| "@types/prettier": "^2.7.1", | ||
| "@types/react": "^18.0.0 || ^19.0.0", | ||
| "@types/react-dom": "^18.0.0 || ^19.0.0", | ||
| "@vanilla-extract/css": "^1.9.2", | ||
| "@vanilla-extract/css-utils": "^0.1.3", | ||
| "@vanilla-extract/dynamic": "^2.1.2", | ||
| "@vanilla-extract/rollup-plugin": "^1.5.1", | ||
| "@vanilla-extract/sprinkles": "^1.5.1", | ||
| "concurrently": "^9.1.2", | ||
| "cypress": "^15.5.0", | ||
| "eslint": "^9.23.0", | ||
|
|
@@ -148,7 +146,8 @@ | |
| "serve": "^14.2.5", | ||
| "start-server-and-test": "^2.0.11", | ||
| "surge": "^0.24.6", | ||
| "tsdown": "^0.12.7" | ||
| "tsdown": "^0.20.0", | ||
| "typescript": ">=5.0.0" | ||
| }, | ||
| "peerDependencies": { | ||
| "react": "^18 || ^19", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, removing this makes jest fail. But this file is part of distributed files, so it may get used by webpack at some point? We wouldn't install the typescript preset for users anymore, so if it's used someway, removing it feels more correct.
Should it be removed from distributed files, or should we provide a separate babel config for jest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all internal babel uses provide a configuration explicitly, so I don't think it's used, and I'd remove it from dist files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed then. I also removed utils dir from dist files, I think it's some old remnant there, as utils are already compiled to dist and wouldn't be accessible from there anyways due to package#exports.