소스 검색

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;
+}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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"
   }
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.