Skip to content

Commit

Permalink
chore: re-enable the webpack-bundle-analyzer
Browse files Browse the repository at this point in the history
* Now works along with webpack-dev-server

* Uses webpack --analyze to invoke the analyzer rather than including the
  plugin in the config

* Allows the dev and prod configs to be used by the analyzer
  • Loading branch information
phantomjinx committed May 8, 2024
1 parent 1145659 commit 56c6214
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/online-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"replace-version": "replace __PACKAGE_VERSION_PLACEHOLDER__ $npm_package_version ./build -r",
"test": "jest --watchAll=false --passWithNoTests",
"test:coverage": "yarn test --coverage",
"analyze:webpack:dev": "webpack --mode development --progress --config webpack.config.dev.js --output-public-path='/online/'",
"analyze:webpack:prod": "webpack --mode production --progress --config webpack.config.dev.js --output-public-path='/online/'"
"analyze:webpack:dev": "webpack --mode development --analyze --progress --config webpack.config.dev.js --output-public-path='/online/'",
"analyze:webpack:prod": "webpack --mode production --analyze --progress --config webpack.config.prod.js --output-public-path='/online/'"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.2",
Expand Down
12 changes: 0 additions & 12 deletions packages/online-shell/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ const { merge } = require('webpack-merge')
const WebpackDevServer = require('webpack-dev-server')
const DotenvPlugin = require('dotenv-webpack')
const historyApiFallback = require('connect-history-api-fallback')
/*
* 22/2/2024
* Analyzer plugin throwing errors with updates to new version of webpack-dev-server
* Disabling for the moment.
*/
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const path = require('path')
const url = require('url')
const dotenv = require('dotenv')
Expand Down Expand Up @@ -70,12 +64,6 @@ module.exports = () => {
systemvars: true,
ignoreStub: true,
}),
/*
* 22/2/2024
* Analyzer plugin throwing errors with updates to new version of webpack-dev-server
* Disabling for the moment.
*/
// new BundleAnalyzerPlugin(),
],

devServer: {
Expand Down

0 comments on commit 56c6214

Please sign in to comment.