Skip to content

Commit

Permalink
Fixed bundleanalyzer addon setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Majid Mallis committed Jun 10, 2018
1 parent 96cba29 commit 2a7d46a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"license": "MIT",
"scripts": {
"dev": "webpack-dev-server --env.env=dev",
"dev:bundleanalyzer": "yarn dev --env.addons=bundleanalyzer",
"dev:bundleanalyzer": "yarn dev -- --env.addons=bundleanalyzer",
"prebuild": "rimraf dist",
"build": "cross-env NODE_ENV=production webpack -p --env.env=prod",
"build:bundleanalyzer": "yarn build --env.addons=bundleanalyzer"
"build:bundleanalyzer": "yarn build -- --env.addons=bundleanalyzer"
},
"dependencies": {
"react": "^16.4.0",
Expand Down
4 changes: 1 addition & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ const addons = (/* string | string[] */ addonsArg) => {
let addons = [...[addonsArg]] // Normalize array of addons (flatten)
.filter(Boolean); // If addons is undefined, filter it out

return addons.map(addonName =>
require(`./build-utils/addons/webpack.${addonName}.js`)
);
return addons.map(addonName => require(`./build-utils/addons/webpack.${addonName}.js`));
};

module.exports = env => {
Expand Down

0 comments on commit 2a7d46a

Please sign in to comment.