Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c498dfe
ignore editor resources
jonamat Nov 29, 2020
afaea72
eslint updated and reconfigured
jonamat Nov 29, 2020
bb25388
standardized dev environment
jonamat Nov 29, 2020
f71605a
webpack updated and configuration refactored
jonamat Nov 29, 2020
78045cd
renamed misleading folder
jonamat Nov 29, 2020
85ced47
React updated to 17x
jonamat Nov 29, 2020
804b22c
app refactoring for React 17x
jonamat Nov 29, 2020
821ffaf
Resolved compatibility issues with webpack 5
jonamat Nov 29, 2020
a237a8d
adapted scripts to the new version
jonamat Nov 29, 2020
304ac8f
bump version
jonamat Nov 29, 2020
9715a47
removed dev crumbs
jonamat Nov 29, 2020
2a7f90d
prepublish
jonamat Nov 30, 2020
ef3893d
added npm details
jonamat Nov 30, 2020
f8852e0
feat(plugin): introduce plugin option throwOnError
raphaelboukara Oct 11, 2023
fcebced
bump minor
jonamat Oct 11, 2023
b4e1c54
feat(plugin): introduce plugin option `chunkModules`
hainenber Jan 22, 2025
34e90f9
feat(plugin): introduce plugin option to pass onto `compilation.getSt…
hainenber Jan 22, 2025
1080dc3
Merge pull request #6 from hainenber/feat/introduce-plugin-option-chu…
jonamat Jan 30, 2025
1c5580e
bump minor
jonamat Jan 30, 2025
d0bbdd1
feat: migrated to react 18
agrohs Jul 16, 2025
c29a580
chore: added gitignores for demo_stats and pnpm-lock.yaml
agrohs Jul 16, 2025
caf8a27
feat: version bump
agrohs Jul 16, 2025
3484828
chore: added developers
agrohs Jul 16, 2025
378e178
feat: added build:stats task
agrohs Jul 16, 2025
45b35d9
feat: updated to react 18
agrohs Jul 16, 2025
6a14519
Merge pull request #7 from agnostack/feat/react18
jonamat Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
prepublish
  • Loading branch information
jonamat committed Nov 30, 2020
commit 2a7f90d969c70faa3e51fd5348abef034fd92cf8
51 changes: 26 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
# Webpack Visualizer
Visualize and analyze your Webpack bundle to see which modules are taking up space and which might be duplicates.
# Webpack Visualizer 2

This tool is still pretty new, so please submit issues or feature requests!
This is a working fork of the unmaintained [webpack-visualizer-plugin](https://github.com/chrisbateman/webpack-visualizer)

It works with webpack 5.x

## Site Usage

Upload your stats JSON file to the site: [chrisbateman.github.io/webpack-visualizer/](http://chrisbateman.github.io/webpack-visualizer/)

## Plugin Usage
## Installation

```
npm install webpack-visualizer-plugin
npm i -D webpack-visualizer-plugin2
```
```javascript
var Visualizer = require('webpack-visualizer-plugin');

//...
plugins: [new Visualizer()],
//...
```
This will output a file named `stats.html` in your output directory. You can modify the name/location by passing a `filename` parameter into the constructor.
## Usage in webpack configuration
This will generate the statistics page in /stats/ folder
NOTE: "filename" points to the webpack output path, not the project root path

```javascript
var Visualizer = require('webpack-visualizer-plugin');
```js
const Visualizer = require('webpack-visualizer-plugin2');

//...
plugins: [new Visualizer({
filename: './statistics.html'
})],
//...
```
module.exports = {
plugins: [

---
new StatsWriterPlugin({
filename: path.join('..', 'stats', 'log.json'),
fields: null,
stats: { chunkModules: true },
}),

new Visualizer({
filename: path.join('..', 'stats', 'statistics.html'),
}),

],
}

```

![](https://cloud.githubusercontent.com/assets/1145857/10471320/5b284d60-71da-11e5-8d35-7d1d4c58843a.png)
125 changes: 66 additions & 59 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,68 @@
{
"name": "webpack-visualizer-plugin",
"version": "1.0.0",
"main": "lib/plugin.js",
"author": "Chris Bateman (http://cbateman.com/)",
"license": "MIT",
"files": [
"lib",
"README.md"
],
"repository": {
"type": "git",
"url": "[email protected]:chrisbateman/webpack-visualizer.git"
},
"scripts": {
"build": "npm run build:site && npm run build:plugin",
"build:plugin": "shx rm -rf ./lib/** && webpack --config ./webpack/plugin/webpack.prod.js && babel ./src/plugin/plugin.js --out-file lib/plugin.js --presets=@babel/preset-env",
"build:site": "webpack --config ./webpack/site/webpack.prod.js",
"start:plugin": "webpack serve --config ./webpack/plugin/webpack.dev.js",
"start:site": "webpack serve --config ./webpack/site/webpack.dev.js",
"lint": "eslint src --ext .js,.jsx",
"lint:fix": "eslint src --fix --ext .js,.jsx",
"preversion": "npm run build",
"publishSite": "git checkout gh-pages && cp dist-site/* . && git add . && git commit -m 'release' && git push origin gh-pages && git checkout master"
},
"dependencies": {
"d3": "^3.5.6",
"mkdirp": "^0.5.1",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.9",
"@babel/eslint-parser": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.7",
"@babel/preset-react": "^7.12.7",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.0.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-webpack-plugin": "^2.4.0",
"html-webpack-plugin": "^4.5.0",
"mini-css-extract-plugin": "^1.3.1",
"prettier": "^2.2.1",
"shx": "^0.3.3",
"style-loader": "^2.0.0",
"webpack": "^5.9.0",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^5.4.0"
},
"engines": {
"npm": ">=5.0.0"
}
"name": "webpack-visualizer-plugin2",
"version": "1.0.0",
"main": "lib/plugin.js",
"author": "Chris Bateman (http://cbateman.com/)",
"contributors": [
{
"name": "Jonathan Mataloni",
"url": "https://github.com/jonamat",
"email": "[email protected]"
}
],
"license": "MIT",
"files": [
"lib",
"README.md"
],
"repository": {
"type": "git",
"url": "[email protected]:jonamat/webpack-visualizer.git"
},
"scripts": {
"build": "npm run build:site && npm run build:plugin",
"build:plugin": "shx rm -rf ./lib/** && webpack --config ./webpack/plugin/webpack.prod.js && babel ./src/plugin/plugin.js --out-file lib/plugin.js --presets=@babel/preset-env",
"build:site": "webpack --config ./webpack/site/webpack.prod.js",
"start:plugin": "webpack serve --config ./webpack/plugin/webpack.dev.js",
"start:site": "webpack serve --config ./webpack/site/webpack.dev.js",
"lint": "eslint src --ext .js,.jsx",
"lint:fix": "eslint src --fix --ext .js,.jsx",
"preversion": "npm run build",
"publishSite": "git checkout gh-pages && cp dist-site/* . && git add . && git commit -m 'release' && git push origin gh-pages && git checkout master"
},
"dependencies": {
"d3": "^3.5.6",
"mkdirp": "^0.5.1",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@babel/cli": "^7.12.8",
"@babel/core": "^7.12.9",
"@babel/eslint-parser": "^7.12.1",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.7",
"@babel/preset-react": "^7.12.7",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.0.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-webpack-plugin": "^2.4.0",
"html-webpack-plugin": "^4.5.0",
"mini-css-extract-plugin": "^1.3.1",
"prettier": "^2.2.1",
"shx": "^0.3.3",
"style-loader": "^2.0.0",
"webpack": "^5.9.0",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^5.4.0"
},
"engines": {
"npm": ">=5.0.0"
}
}