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.

webpack-bundle-analyzer displays a blank page when run from the CLI

See original GitHub issue

Issue description

Hello. When using the plugin the bundle analyzer displays everything correctly. However, I want to use a stats.json file that I’m generating with production flags on.

Unfortunately, the page is just completely blank.

Technical info

  System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 201.30 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.1 - /usr/local/bin/node
    npm: 6.14.5 - /usr/local/bin/npm
  npmPackages:
    koa-webpack: ^5.3.0 => 5.3.0
    terser-webpack-plugin: ^3.0.6 => 3.0.6
    webpack: ^4.42.0 => 4.43.0
    webpack-bundle-analyzer: ^3.8.0 => 3.8.0
    webpack-cli: ^3.3.12 => 3.3.12
    webpack-dev-server: 3.10.3 => 3.10.3
    webpack-hot-middleware: ^2.25.0 => 2.25.0
    webpack-merge: ^4.2.2 => 4.2.2
    webpack-node-externals: ^1.7.2 => 1.7.2
  npmGlobalPackages:
    webpack-bundle-analyzer: 3.8.0

Debug info

$ NODE_ENV=production `npm bin`/webpack \
  --config webpack.client.js \
  -o build/client/index.js \
  --profile --json > stats.json
$ webpack-bundle-analyzer stats.json
Screen Shot 2020-07-11 at 8 36 33 AM

stats.json.zip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Igloczekcommented, Jul 14, 2020

Check your Webpack config file, seems like having stats: 'error-only' is causing the stats.json to have very limited output.

2reactions
valscioncommented, Jan 12, 2021

@david-wolgemuth it could be that compression-webpack-plugin is causing your issue, as https://github.com/webpack-contrib/webpack-bundle-analyzer/pull/379 isn’t yet done ☺️

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use the webpack bundle analyzer - Jakob Lind
There are two ways to configure webpack bundle analyzer in a webpack project. Either as a plugin or using the command-line interface.
Read more >
Why is my browser showing a blank page after code splitting ...
The bundle splitting works fine for our own code base, but when I split the node modules, the browser shows a blank page...
Read more >
Command Line Interface - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Webpack Bundle Analyzer with Create React App ... - YouTube
Webpack Bundle Analyzer is a tool to visualize the size of webpack output files. Zooming is one of the features of this tool....
Read more >
umi-webpack-bundle-analyzer - npm
Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap. Latest version: 4.4.2, ...
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