-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore(esm/cjs): Build rwjs/web to cjs with new build system #10826
chore(esm/cjs): Build rwjs/web to cjs with new build system #10826
Conversation
Rename files without JSX files to just ts
…ckage-cjsonly-new-build * 'main' of github.com:redwoodjs/redwood: (66 commits) chore(testing dbAuth): Add "yes" prompt testing for WebAuthn (redwoodjs#10823) chore(testing dbAuth): Mock console.log to silence test output (redwoodjs#10821) chore(testing dbAuth): Remove duplicated tests (redwoodjs#10822) chore(testing dbAuth): Remove outdated code (redwoodjs#10820) chore(testing dbAuth): Consistent naming and fix blue squiggles (redwoodjs#10819) chore(testing dbAuth): provide mock implementations (redwoodjs#10818) feat(dbAuth): Only suggest dbAuth setup if needed (redwoodjs#10793) chore(dbAuth): Fix test for webauthn prompt in `g dbAuth` (redwoodjs#10814) fix(dbAuth): Print the correct "post message" after generation (redwoodjs#10813) fix(dbauth): Fix spacing issue in task titles (redwoodjs#10811) deps(docs): update braces package (redwoodjs#10809) chore(deps): bump braces from 3.0.2 to 3.0.3 in /tasks/check (redwoodjs#10808) chore(deps): update yarn to v4.3.0 (redwoodjs#10801) chore(deps): update dependency tsx to v4.15.2 (redwoodjs#10800) chore(deps): update dependency @clerk/types to v3.65.2 (redwoodjs#10795) chore(deps): update dependency firebase to v10.12.2 (redwoodjs#10802) chore(deps): update dependency rollup to v4.18.0 (redwoodjs#10799) chore(deps): update dependency jsdom to v24.1.0 (redwoodjs#10798) chore(deps): update dependency @types/vscode to v1.90.0 (redwoodjs#10796) chore(deps): update dependency @clerk/clerk-react to v4.32.2 (redwoodjs#10794) ...
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.
Nice, looks good to me. There appear to be 4 files deleted from the dist but there are all test files which should never have been there to start with. CI being green is confidence enough for me with the dist having the same files. Looking forward to moving more of our code over and then to esm.
…-esm * 'main' of github.com:redwoodjs/redwood: fix(deps): update dependency prettier to v3.3.2 (redwoodjs#10852) fix(deps): update dependency vite to v5.3.1 (redwoodjs#10854) chore(esm/cjs): Build rwjs/web to cjs with new build system (redwoodjs#10826) feat(dbAuth): Automatically create User model in fresh projects (redwoodjs#10871) feat(dbAuth): Prompt to generate dbAuth pages (redwoodjs#10865)
This PR swaps the babel build process for esbuild, as a first step of converting the web package to ESM/CJS.
In order to get this to work I had to manually import React in all of the source files with JSX, as it was being autoimported by a babel plugin. I think this is better than just adding another plugin to our build step (keep it vanilla!)
Tested with auth
✅ legacy
✅ ssr-streaming
Tested with kitchen sink
✅ RSC
Note:
I had to change the "remove from bundle" plugin. It took a lot of experimentation, but switching to esm syntax seems to fix it in all cases.