Giter Club home page Giter Club logo

Comments (12)

kopax avatar kopax commented on May 8, 2024

I was able to run it using

npm install -g npm-run 
npm-run webpack-bundle-analyzer --help

Then I did

npm run build

The project is a module, so I was expecting not to visualize any peerDependencies in node_modules.

Also, it hold my terminal open with the new server started.

Is it possible to launch it manually with it's own command ?

from webpack-bundle-analyzer.

th0r avatar th0r commented on May 8, 2024

I don't know how to run the analysis

You should include this plugin into your webpack config and it will open analyzer in your default browser in the end of the bundle build process.

from webpack-bundle-analyzer.

kopax avatar kopax commented on May 8, 2024

What about is the build process is executed by jenkins and I don't wan't it to be executed ?

from webpack-bundle-analyzer.

th0r avatar th0r commented on May 8, 2024

Read about analyzerMode, reportFilename and openAnalyzer options in the readme.

from webpack-bundle-analyzer.

th0r avatar th0r commented on May 8, 2024

@kopax Does your problem solved?

from webpack-bundle-analyzer.

kopax avatar kopax commented on May 8, 2024

Hi @th0r, sorry for the late reply. This solved my issue.

from webpack-bundle-analyzer.

broweratcognitecdotcom avatar broweratcognitecdotcom commented on May 8, 2024

I'm trying to use this in an angular-cli generated project. It doesn't work because it chooses localhost by default. How can I use a specific host and port while using angular-cli? Thanks.

[Edit] Solution:

"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer --host 192.168.208.84 --port 4200 dist/stats.json"
},

from webpack-bundle-analyzer.

valscion avatar valscion commented on May 8, 2024

Hi @broweratcognitecdotcom! Unfortunately, I don't know what angular-cli does and how it integrates with webpack-bundle-analyzer, so you might have more luck asking your question in their issue tracker or stack overflow.

from webpack-bundle-analyzer.

joshwiens avatar joshwiens commented on May 8, 2024

@valscion - There is no integration. The Angular/CLI simply outputs a stats.json which you target with webpack-bundle-analyzer.

From the command above, it looks like he is trying to execute that on a remote system.

from webpack-bundle-analyzer.

broweratcognitecdotcom avatar broweratcognitecdotcom commented on May 8, 2024

I had to add --host and --port to my scripts entry in my package.json. --analyzerHost and --analyzerPort didn't work:

"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer --host 192.168.208.84 --port 4200 dist/stats.json"
},

from webpack-bundle-analyzer.

valscion avatar valscion commented on May 8, 2024

Ok great! Glad you got it working ☺️.

We should probably document the CLI options, too, so that these questions would have answers in the README already.

from webpack-bundle-analyzer.

broweratcognitecdotcom avatar broweratcognitecdotcom commented on May 8, 2024

That'd be cool. My solution is not really ideal because every dev at least here will be using a different host and port and there is only one package.json file. But at least i could finally see the report and verify that lodash was the culprit.

from webpack-bundle-analyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.