Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: add webpack bundle analyzer #2359

Closed

Conversation

themre
Copy link
Contributor

@themre themre commented May 25, 2017

Based on #798 I would like to propose to add some bundle analyzer into CRA. I would however like to put it into some conditional scripts or pass some arguments into build script, like: const addAnalyzer = process.argv.indexOf('--stats') !== -1;.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact [email protected] if you have any questions.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@chrisprice
Copy link

@themre looks like it started up a server which it expected the user to terminate, as there was no user the build timed out.

@viankakrisna
Copy link
Contributor

@themre judging from the docs here https://github.com/th0r/webpack-bundle-analyzer#installation-and-usage

  // Can be `server`, `static` or `disabled`.
  // In `server` mode analyzer will start HTTP server to show bundle report.
  // In `static` mode single HTML file with bundle report will be generated.
  // In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.
  analyzerMode: 'server',

maybe you can use

analyerMode: 'static'

?

@ro-savage
Copy link
Contributor

ro-savage commented May 29, 2017

An alternative would be using source-map-explorer. Its super simple to add, it doesn't auto-run as part of webpack instead you manually run when you want to see the bundle makeup, and its more generic and can be used in non-webpack projects.

Ninja edit: Looks like someone has add it with #1641 CRA only need sone of there two PRs as they both do the same thing.

@Timer
Copy link
Contributor

Timer commented Jan 9, 2018

I don't think we'll be merging this considering tools like source-map-explorer work and get the job done. Thanks!

@Timer Timer closed this Jan 9, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants