Comments (12)
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.
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.
What about is the build process is executed by jenkins and I don't wan't it to be executed ?
from webpack-bundle-analyzer.
Read about analyzerMode
, reportFilename
and openAnalyzer
options in the readme.
from webpack-bundle-analyzer.
@kopax Does your problem solved?
from webpack-bundle-analyzer.
Hi @th0r, sorry for the late reply. This solved my issue.
from webpack-bundle-analyzer.
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.
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.
@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.
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.
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.
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)
- Unable to run with webpack 5 HOT 2
- Stats parsing is broken Webpack 5 HOT 2
- [Question] Chrome performance issue HOT 2
- [Question] Combining statistics into one file (displaying on the same port) for multiple webpack configurations HOT 2
- Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory HOT 2
- opener vulnerability ([email protected] -> [email protected]) HOT 1
- Search should gray out non-matches? HOT 1
- Analyzer page showed different bundle size than browser devtools HOT 2
- Error generating bundle report: Error parsing bundle asset: 'import' and 'export' may appear only with 'sourceType: module' HOT 1
- Error parsing bundle asset "C:\Projects\re\dist\apps\cart\remoteEntry.js": Cannot use 'import.meta' outside a module (1:2374)
- Crashes on files over 512MB HOT 2
- "Unexpected token" when analyzing via packtracker
- Incorrect size when using Webpack's `BannerPlugin` HOT 5
- How to use this repo to analyze some web extensions?
- Bundle parsing breaks if bundled code creates a sequence HOT 4
- Could't analyze webpack bundle: TypeError: Cannot read properties of undefined (reading 'filter') HOT 4
- Override analyzerMode via environment variable
- Support built-in Typescript declarations HOT 1
- Update "ws" package dependency to version 7.4.6 or greater HOT 1
- Filter by entry point HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-bundle-analyzer.