Chunk contents are lost with some values of `output.libraryTarget`

Author: HypnosphiCreated Jul 21, 2020Updated Aug 20, 2026
Labelstype: Bug
#### 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 ![image](https://user-images.githubusercontent.com/6651625/88096208-96937300-cb96-11ea-8e2c-d6c9a339e944.png) #### Actual ![image](https://user-images.githubusercontent.com/6651625/88096345-c773a800-cb96-11ea-89b1-4e39b3940dfc.png)

Source: webpack/webpack-bundle-analyzer