From 2a7d46a7c4d78eda9f0748f8f72b119866604fc6 Mon Sep 17 00:00:00 2001 From: Majid Mallis Date: Sat, 9 Jun 2018 18:40:59 -0700 Subject: [PATCH] Fixed bundleanalyzer addon setup --- package.json | 4 ++-- webpack.config.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e6cd1ff..daa9b04 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/webpack.config.js b/webpack.config.js index 534d324..993cae6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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 => {