-
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
[WIP] try bundling CRWA #8071
[WIP] try bundling CRWA #8071
Conversation
16 replays were recorded for 7f7c7f5. 16 PassedrequireAuth graphql checks
|
I tested the results of this locally and all the various crwa options worked as expected. I also tested with with the On the issue of potentially removing At least my testing locally showed this, perhaps (If that bundled+minified size is equivalent to the installed package size reported for the current stable create-redwood-app this would be a 99.2% reduction in size) |
@Josh-Walker-GM great finds! Leaving some more notes here. The main thing to watch out for in bundling node_modules is this (source: https://esbuild.github.io/getting-started/#bundling-for-node):
Disabling minify and doing a quick search for Given this, maybe we should break this PR into two: 1) just remove Babel so we at least shed the dependencies on |
e83b37d
to
f8e6002
Compare
This PR:
dependencies
are nowdevDependencies
so that yarn doesn't try to install anything (it just needs the file) when a user runsyarn create redwood-app
@redwoodjs/tui
build process in favor of using esbuild to transform syntaxYou can visualize meta.json files generated by the build scripts using esbuild's bundle analyzer: https://esbuild.github.io/analyze/. Here's an example of create-redwood-app's bundle:
To further reduce bundle size, the flame chart above suggests we should look into finding an alternative for
systeminformation
.