question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Actual

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
valscioncommented, Jan 14, 2021

Nowadays we’re able to test running with different webpack versions.

I’d be happy to see a PR that adds test coverage for all the different libraryTarget values so we could get the infrastructure ready for further bundle parser development ☺️

0reactions
hereisfuncommented, Jan 13, 2021

Has there been any progress? So far I use source-map-explorer instead, but it’s not accurate enough. Hoping to see a bugfix soon, because webpack-bundle-analyzer is very useful 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 4 splitChunks and libraryTarget - Stack Overflow
I have some entries: app , vendor , polyfills , bootstrap and output as library ['app', '[name]'] and libraryTarget var .
Read more >
Output - webpack
The top-level output key contains a set of options instructing webpack on how and where it should output your bundles, assets, and anything...
Read more >
(Some) Webpack Configuration Options Explained
Here's where libraryTarget config comes in. First a quick note, to give your library a name (you should), set the output.library config to...
Read more >
GN Reference - Google Git
Deletes the contents of the output directory except for args.gn and creates a Ninja build environment sufficient to regenerate the build.
Read more >
webpack-bundle-analyzer - Bountysource
Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable ... Chunk contents are lost with some values of `output....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found