Setting output.globalObject breaks parsed + gzip
See original GitHub issueIssue description
config.output.globalObject = "(typeof self !== 'undefined' ? self : this)"
Breaks parsed + gzip sizes. Removing it fixed them.
Technical info
- Webpack Bundle Analyzer version: 3.3.2
- Webpack version: 4.35.0
- Node.js version: 11.10.0
- npm/yarn version: 6.7.0
- OS: mac os x; windows
Expected Behavior
Gzip and parsed should contain data bout more than just the output files - the modules inside them as well.
Actual Behavior
Only stats includes all modules. Gzip and parsed just show large blocks for each bundle piece (output file)
Code
My default:
config.output.globalObject = "(typeof self !== 'undefined' ? self : this)"
When I analyze:
delete config.output.globalObject;
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
webpack-bundle-analyzer/CHANGELOG.md - UNPKG
84, * Support any custom `globalObject` option in Webpack Config. ... Those chunks just won't be visible in the report for parsed/gzipped sizes....
Read more >webpack-bundle-analyzer | Yarn - Package Manager
Troubleshooting. I don't see gzip or parsed sizes, it only shows stat size. It happens when webpack-bundle-analyzer analyzes files that don't actually exist...
Read more >Output - webpack
To make UMD build available on both browsers and Node.js, set output.globalObject option to 'this' . Defaults to self for Web-like targets.
Read more >Node.js v19.3.0 Documentation
Contributing; Stability index; Stability overview; JSON output; System calls and man ... The --zero-fill-buffers command-line option; What makes Buffer.
Read more >Safari Technology Preview Release Notes - Apple Developer
Note: Shared Tab Groups and syncing for Tab Groups, Website Settings, ... Relaxed Date parsing to accept narrow-no-break-space (256754@main) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This string is inserted in the generated code as-is - it should not be evaluated at compile time.
E.g. imagine this bundle template:
Then resulting bundle will be:
Oh wow, that wasn’t obvious at all from the webpack documentation. Thanks for explaining.