Repository navigation
Conversation
nosource-source-mapnosource-source-map
petschki
force-pushed
the
fix-nosources-source-map
branch
from
September 17, 2026 09:11
9b28411 to
9c6cab8
Compare
The production build shipped full source maps with the embedded sources of every chunk. With the lazy locale-data chunks this amounts to 159 MB of maps for the Plone bundle, all of it committed to plone.staticresources and installed on every deployment. nosources-source-map keeps the mappings, so stack traces still point to the original file and line, but drops the sources: 12 MB instead of 159 MB. css-loader and sass-loader derive their sourceMap option from devtool, and style-loader embeds the resulting CSS source maps into the JS chunks, where every browser downloads and parses them: the TinyMCE chunk alone grew from 1.9 MB to 3.2 MB (481 KB to 662 KB gzipped) with full maps, and all non-locale chunks together carried 1.8 MB (330 KB gzipped) of CSS maps. Switch them off explicitly for production builds. Development builds keep the full source maps.
thet
force-pushed
the
fix-nosources-source-map
branch
from
September 17, 2026 11:41
9c6cab8 to
301990e
Compare
thet
requested changes
Sep 17, 2026
thet
left a comment
Member
There was a problem hiding this comment.
Great findings! Instead of adding this here, I want to move that into @patternslib/dev as new defaults.
I'm currently working on this.
Member
Author
|
obsolete since |
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.
Bundle sizes compared by configuration:

Note:
bundle-analyzer doesn't recognize
.mapfiles at all but there's an important finding:css-loaderandsass-loaderadd CSS maps into the JS chunks whendevtoolsis configured. that's why the tinymce chunk gets smaller when changing the value here.I've added
sourceMap: falseto thecss/sass-loadermaps options explicitly to get rid of that too when usingnosource-source-mapoption. see variant 4 in the screenshot.