Repository navigation
Conversation
Not intended to merge, kept for reference. See the rejected-alternative fold in #338. 🤖 Generated with Claude Code
npm pack drops every node_modules directory, so the packed prototype missed tslib, react-hotkeys and the other bundled modules. 🤖 Generated with Claude Code
limes-build.sh builds the consumer with Rspack stats, route-load.py sums what each route's first page load needs. 🤖 Generated with Claude Code
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prototype, not planned to merge: a per-module build so consumers bundle only the CSS of the components they use.
The measurements and the reasons against it are in the rejected-alternative fold of #338.
In our main consumer it trims each first page load by about 84 KB gzip of JS and 119 KB of CSS
The consumer, built against a packed tarball of this branch and compared with 21.0.1 across 205 lazily loaded routes, counting entry chunks plus the route's chunk group:
The app shell imports 33 of the 53 component styles it uses before any route loads: grid, button, menu, date-picker, table, input and more, 454 KB.
Only 103 KB moves into route chunks.
A larger gain needs the consumer to load its shell lazily, not only the library to split.
For agents 🤖: parked prototype, close when no consumer needs it
preserveModulesbuild, antd and dependencies external,output.pathsmapsantd/esfor esm andantd/libfor cjs.scripts/antd-styles.cjscompiles one prefixed, minified stylesheet per antd component intostyles/, withsrc/antd-variables.lessimported(multiple). The compact theme must come fromantd/es/style/themes/compact.less.antdStyleImportsprepends the CSS imports of each module's antd dependency closure.rspack build --json; scripts inscripts/limes-build.shandscripts/route-load.py, which read and write/tmp/per-module-scripts. The consumer needs itsesm/index.cssimport removed.scripts/antd-styles.cjs,rc-pickerandtslibmissing fromdependencies, no visual check, Storybook and the second consumer untested. Measuring scripts were in/tmp/per-module-scripts, not committed.🤖 Generated with Claude Code