webpack / webpack/webpack-bundle-analyzer
Chunk contents are lost with some values of `output.libraryTarget`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12.7k
- Forks
- 514
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 4
Description
Issue description
When using global, window, this, commonjs, commonjs2, or assign as output.libraryTarget, chunk contents are not displayed in report. var, umd, 'amd', 'amd-require', 'system', and 'jsonp' work OK.
Technical info
System:
OS: macOS 10.15.6
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 1.35 GB / 32.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.2 - ~/n/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - ~/n/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
npmPackages:
webpack: ^4.43.0 => 4.43.0
webpack-bundle-analyzer: ^3.8.0 => 3.8.0
webpack-cli: ^3.3.12 => 3.3.12
Reproduction
https://github.com/Hypnosphi/webpack-bundle-analyzer-repro
Expected

Actual

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked webpack-bundle-analyzer reproduction and compare reports for the listed output.libraryTarget values, especially global, window, this, commonjs, commonjs2, and assign versus the working targets. Trace how chunk contents are collected and displayed, then verify that the affected targets show chunk contents in the report without regressing the working cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- data-visualization, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100