瀏覽代碼

add webpacl bundle analyzer

v.shebanov 4 年之前
父節點
當前提交
3adae52742
共有 3 個文件被更改,包括 253 次插入224 次删除
  1. 13 0
      front/config-overrides.js
  2. 233 221
      front/package-lock.json
  3. 7 3
      front/package.json

+ 13 - 0
front/config-overrides.js

@@ -0,0 +1,13 @@
+const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
+
+module.exports = function override(config, env) {
+    if (!config.plugins) {
+        config.plugins = [];
+    }
+
+    config.plugins.push(
+      new BundleAnalyzerPlugin()
+    );
+
+    return config;
+}

File diff suppressed because it is too large
+ 233 - 221
front/package-lock.json


+ 7 - 3
front/package.json

@@ -14,9 +14,13 @@
   },
   "proxy": "http://localhost:5000/",
   "scripts": {
-    "start": "react-scripts start",
-    "build": "react-scripts build",
-    "test": "react-scripts test --env=jsdom",
+    "start": "react-app-rewired start",
+    "build": "react-app-rewired build",
+    "test": "react-app-rewired test --env=jsdom",
     "eject": "react-scripts eject"
+  },
+  "devDependencies": {
+    "react-app-rewired": "^2.1.8",
+    "webpack-bundle-analyzer": "^4.4.0"
   }
 }

Some files were not shown because too many files changed in this diff