Selaa lähdekoodia

使用ESLint等工具检查和优化代码

SongZihuan 3 kuukautta sitten
vanhempi
sitoutus
b20ae53675
21 muutettua tiedostoa jossa 1460 lisäystä ja 903 poistoa
  1. 30 0
      .eslintignore
  2. 127 0
      .eslintrc.cjs
  3. 14 0
      .prettierrc.cjs
  4. 13 7
      package.json
  5. 390 23
      pnpm-lock.yaml
  6. 1 1
      src/404.js
  7. 1 1
      src/4xx.js
  8. 1 1
      src/5xx.js
  9. 12 12
      src/common.js
  10. 1 2
      src/index.js
  11. 1 1
      src/license.js
  12. 1 1
      src/mitorg.js
  13. 1 1
      src/new.js
  14. 1 1
      src/signal.js
  15. 34 32
      src/utils/file.js
  16. 259 0
      webpack_config_dev.cjs
  17. 0 255
      webpack_config_dev.js
  18. 294 0
      webpack_config_github.cjs
  19. 0 290
      webpack_config_github.js
  20. 279 0
      webpack_config_prod.cjs
  21. 0 275
      webpack_config_prod.js

+ 30 - 0
.eslintignore

@@ -0,0 +1,30 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+dist-*
+dist-development
+dist-production
+dist-dev
+dist-prod
+docs
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 127 - 0
.eslintrc.cjs

@@ -0,0 +1,127 @@
+/*!
+ * https://eslint.bootcss.com/docs/rules/
+ * https://eslint.vuejs.org/rules/
+ */
+
+module.exports = {
+  root: true,
+  env: {
+    browser: true,
+    node: true,
+    es6: true
+  },
+  parserOptions: {
+    sourceType: 'module'
+  },
+  extends: ['prettier', 'eslint:recommended', 'plugin:prettier/recommended'],
+  plugins: ['prettier'],
+  rules: {
+    'no-undef': 'off',
+    'prettier/prettier': 'warn',
+    'no-unused-vars': 'warn',
+    // 禁用debugger
+    'no-debugger': 'warn',
+    // 禁止出现重复的 case 标签
+    'no-duplicate-case': 'warn',
+    // 禁止出现空语句块
+    // 'no-empty': 'warn',
+    // 禁止不必要的括号
+    'no-extra-parens': 'off',
+    // 禁止对 function 声明重新赋值
+    'no-func-assign': 'warn',
+    // 禁止在 return、throw、continue 和 break 语句之后出现不可达代码
+    'no-unreachable': 'warn',
+    // 强制所有控制语句使用一致的括号风格
+    curly: 'warn',
+    // 要求 switch 语句中有 default 分支
+    'default-case': 'warn',
+    // 强制尽可能地使用点号
+    'dot-notation': 'warn',
+    // 要求使用 === 和 !==
+    // eqeqeq: 'warn',
+    // 禁止 if 语句中 return 语句之后有 else 块
+    'no-else-return': 'warn',
+    // 禁止出现空函数
+    // 'no-empty-function': 'warn',
+    // 禁用不必要的嵌套块
+    'no-lone-blocks': 'warn',
+    // 禁止使用多个空格
+    'no-multi-spaces': 'warn',
+    // 禁止多次声明同一变量
+    'no-redeclare': 'warn',
+    // 禁止在 return 语句中使用赋值语句
+    'no-return-assign': 'warn',
+    // 禁用不必要的 return await
+    'no-return-await': 'warn',
+    // 禁止自我赋值
+    'no-self-assign': 'warn',
+    // 禁止自身比较
+    'no-self-compare': 'warn',
+    // 禁止不必要的 catch 子句
+    'no-useless-catch': 'warn',
+    // 禁止多余的 return 语句
+    'no-useless-return': 'warn',
+    // 禁止变量声明与外层作用域的变量同名
+    'no-shadow': 'off',
+    // 允许delete变量
+    'no-delete-var': 'off',
+    // 强制数组方括号中使用一致的空格
+    'array-bracket-spacing': 'warn',
+    // 强制在代码块中使用一致的大括号风格
+    'brace-style': 'warn',
+    // 强制使用骆驼拼写法命名约定
+    // camelcase: 'warn',
+    // 强制使用一致的缩进
+    indent: 'off',
+    // 强制在 JSX 属性中一致地使用双引号或单引号
+    // 'jsx-quotes': 'warn',
+    // 强制可嵌套的块的最大深度4
+    'max-depth': 'warn',
+    // 强制最大行数 300
+    // "max-lines": ["warn", { "max": 1200 }],
+    // 强制函数最大代码行数 50
+    // 'max-lines-per-function': ['warn', { max: 70 }],
+    // 强制函数块最多允许的的语句数量20
+    'max-statements': ['warn', 100],
+    // 强制回调函数最大嵌套深度
+    'max-nested-callbacks': ['warn', 5],
+    // 强制每一行中所允许的最大语句数量
+    'max-statements-per-line': ['warn', { max: 1 }],
+    // 要求方法链中每个调用都有一个换行符
+    'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 3 }],
+    // 禁止 if 作为唯一的语句出现在 else 语句中
+    'no-lonely-if': 'warn',
+    // 禁止空格和 tab 的混合缩进
+    'no-mixed-spaces-and-tabs': 'warn',
+    // 禁止出现多行空行
+    'no-multiple-empty-lines': 'warn',
+    // 禁止出现;
+    semi: ['warn', 'never'],
+    // 强制在块之前使用一致的空格
+    'space-before-blocks': 'warn',
+    // 强制在 function的左括号之前使用一致的空格
+    // 'space-before-function-paren': ['warn', 'never'],
+    // 强制在圆括号内使用一致的空格
+    'space-in-parens': 'warn',
+    // 要求操作符周围有空格
+    'space-infix-ops': 'warn',
+    // 强制在一元操作符前后使用一致的空格
+    'space-unary-ops': 'warn',
+    // 强制在注释中 // 或 /* 使用一致的空格
+    // "spaced-comment": "warn",
+    // 强制在 switch 的冒号左右有空格
+    'switch-colon-spacing': 'warn',
+    // 强制箭头函数的箭头前后使用一致的空格
+    'arrow-spacing': 'warn',
+    'no-var': 'warn',
+    'prefer-const': 'warn',
+    'prefer-rest-params': 'warn',
+    'no-useless-escape': 'warn',
+    'no-irregular-whitespace': 'warn',
+    'no-prototype-builtins': 'warn',
+    'no-fallthrough': 'warn',
+    'no-extra-boolean-cast': 'warn',
+    'no-case-declarations': 'warn',
+    'no-async-promise-executor': 'warn'
+  }
+}

+ 14 - 0
.prettierrc.cjs

@@ -0,0 +1,14 @@
+module.exports = {
+    printWidth: 120, // 换行字符串阈值
+    tabWidth: 2, // 设置工具每一个水平缩进的空格数
+    useTabs: false,
+    semi: false, // 句末是否加分号
+    vueIndentScriptAndStyle: true,
+    singleQuote: true, // 用单引号
+    trailingComma: 'none', // 最后一个对象元素符加逗号
+    bracketSpacing: true,
+    jsxBracketSameLine: true, // jsx > 是否另取一行
+    arrowParens: 'always', // 不需要写文件开头的 @prettier
+    insertPragma: false, // 不需要自动在文件开头加入 @prettier
+    endOfLine: 'lf' // 换行符使用
+}

+ 13 - 7
package.json

@@ -4,14 +4,16 @@
   "description": "",
   "main": "src/index.js",
   "scripts": {
-    "dev": "npx webpack server --config webpack_config_dev.js",
-    "build:dev": "npx webpack --config webpack_config_dev.js",
+    "lint": "eslint --ext .js,.mjs,.cjs,.ts --fix .",
+    "lint:debug": "eslint --ext .js,.mjs,.cjs,.ts --debug --fix .",
+    "dev": "npx webpack server --config webpack_config_dev.cjs",
+    "build:dev": "npx webpack --config webpack_config_dev.cjs",
     "build:dev:run": "npx pnpm build:dev && npx pnpm dev",
-    "prod": "npx webpack server --config webpack_config_prod.js",
-    "build:prod": "npx webpack --config webpack_config_prod.js",
+    "prod": "npx webpack server --config webpack_config_prod.cjs",
+    "build:prod": "npx webpack --config webpack_config_prod.cjs",
     "build:prod:run": "npx pnpm build:prod && npx pnpm prod",
-    "github": "npx webpack server --config webpack_config_github.js",
-    "build:github": "npx webpack --config webpack_config_github.js && node ./github-page/cname.cjs",
+    "github": "npx webpack server --config webpack_config_github.cjs",
+    "build:github": "npx webpack --config webpack_config_github.cjs && node ./github-page/cname.cjs",
     "build:github:run": "npx pnpm build:github && npx pnpm github"
   },
   "author": "宋子桓(Song Zihuan)",
@@ -19,9 +21,12 @@
   "devDependencies": {
     "copy-webpack-plugin": "^12.0.2",
     "css-loader": "^7.1.2",
+    "eslint": "^8.38.0",
+    "eslint-config-prettier": "^8.8.0",
     "html-loader": "^5.1.0",
     "html-webpack-plugin": "^5.6.3",
     "mini-css-extract-plugin": "^2.9.2",
+    "prettier": "^2.8.7",
     "webpack": "^5.97.1",
     "webpack-cli": "^6.0.1",
     "webpack-dev-server": "^5.2.0"
@@ -35,6 +40,7 @@
     "postcss-loader": "^8.1.1",
     "sass": "^1.83.4",
     "sass-loader": "^16.0.4",
-    "url-loader": "^4.1.1"
+    "url-loader": "^4.1.1",
+    "eslint-plugin-prettier": "^4.2.1"
   }
 }

+ 390 - 23
pnpm-lock.yaml

@@ -5,6 +5,9 @@ settings:
   excludeLinksFromLockfile: false
 
 dependencies:
+  eslint-plugin-prettier:
+    specifier: ^4.2.1
+    version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.1)(prettier@2.8.8)
   extract-loader:
     specifier: ^5.1.0
     version: 5.1.0
@@ -40,6 +43,12 @@ devDependencies:
   css-loader:
     specifier: ^7.1.2
     version: 7.1.2(webpack@5.97.1)
+  eslint:
+    specifier: ^8.38.0
+    version: 8.57.1
+  eslint-config-prettier:
+    specifier: ^8.8.0
+    version: 8.10.0(eslint@8.57.1)
   html-loader:
     specifier: ^5.1.0
     version: 5.1.0(webpack@5.97.1)
@@ -49,6 +58,9 @@ devDependencies:
   mini-css-extract-plugin:
     specifier: ^2.9.2
     version: 2.9.2(webpack@5.97.1)
+  prettier:
+    specifier: ^2.8.7
+    version: 2.8.8
   webpack:
     specifier: ^5.97.1
     version: 5.97.1(webpack-cli@6.0.1)
@@ -79,6 +91,58 @@ packages:
     resolution: {integrity: sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==}
     engines: {node: '>=14.17.0'}
 
+  /@eslint-community/eslint-utils@4.4.1(eslint@8.57.1):
+    resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+    peerDependencies:
+      eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
+    dependencies:
+      eslint: 8.57.1
+      eslint-visitor-keys: 3.4.3
+
+  /@eslint-community/regexpp@4.12.1:
+    resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
+    engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
+
+  /@eslint/eslintrc@2.1.4:
+    resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+    dependencies:
+      ajv: 6.12.6
+      debug: 4.4.0
+      espree: 9.6.1
+      globals: 13.24.0
+      ignore: 5.3.2
+      import-fresh: 3.3.0
+      js-yaml: 4.1.0
+      minimatch: 3.1.2
+      strip-json-comments: 3.1.1
+    transitivePeerDependencies:
+      - supports-color
+
+  /@eslint/js@8.57.1:
+    resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+
+  /@humanwhocodes/config-array@0.13.0:
+    resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==}
+    engines: {node: '>=10.10.0'}
+    deprecated: Use @eslint/config-array instead
+    dependencies:
+      '@humanwhocodes/object-schema': 2.0.3
+      debug: 4.4.0
+      minimatch: 3.1.2
+    transitivePeerDependencies:
+      - supports-color
+
+  /@humanwhocodes/module-importer@1.0.1:
+    resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
+    engines: {node: '>=12.22'}
+
+  /@humanwhocodes/object-schema@2.0.3:
+    resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==}
+    deprecated: Use @eslint/object-schema instead
+
   /@jridgewell/gen-mapping@0.3.8:
     resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==}
     engines: {node: '>=6.0.0'}
@@ -147,12 +211,10 @@ packages:
     dependencies:
       '@nodelib/fs.stat': 2.0.5
       run-parallel: 1.2.0
-    dev: true
 
   /@nodelib/fs.stat@2.0.5:
     resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
     engines: {node: '>= 8'}
-    dev: true
 
   /@nodelib/fs.walk@1.2.8:
     resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
@@ -160,7 +222,6 @@ packages:
     dependencies:
       '@nodelib/fs.scandir': 2.1.5
       fastq: 1.18.0
-    dev: true
 
   /@parcel/watcher-android-arm64@2.5.0:
     resolution: {integrity: sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==}
@@ -442,6 +503,9 @@ packages:
     dependencies:
       '@types/node': 22.10.7
 
+  /@ungap/structured-clone@1.2.1:
+    resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==}
+
   /@webassemblyjs/ast@1.14.1:
     resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==}
     dependencies:
@@ -581,6 +645,13 @@ packages:
       mime-types: 2.1.35
       negotiator: 0.6.3
 
+  /acorn-jsx@5.3.2(acorn@8.14.0):
+    resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
+    peerDependencies:
+      acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
+    dependencies:
+      acorn: 8.14.0
+
   /acorn@8.14.0:
     resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}
     engines: {node: '>=0.4.0'}
@@ -640,13 +711,18 @@ packages:
   /ansi-regex@5.0.1:
     resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
     engines: {node: '>=8'}
-    dev: true
 
   /ansi-styles@2.2.1:
     resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==}
     engines: {node: '>=0.10.0'}
     dev: false
 
+  /ansi-styles@4.3.0:
+    resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
+    engines: {node: '>=8'}
+    dependencies:
+      color-convert: 2.0.1
+
   /anymatch@3.1.3:
     resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
     engines: {node: '>= 8'}
@@ -656,7 +732,6 @@ packages:
 
   /argparse@2.0.1:
     resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
-    dev: false
 
   /array-flatten@1.1.1:
     resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==}
@@ -1176,7 +1251,6 @@ packages:
 
   /balanced-match@1.0.2:
     resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
-    dev: false
 
   /batch@0.6.1:
     resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==}
@@ -1223,7 +1297,6 @@ packages:
     dependencies:
       balanced-match: 1.0.2
       concat-map: 0.0.1
-    dev: false
 
   /braces@3.0.3:
     resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
@@ -1285,7 +1358,6 @@ packages:
   /callsites@3.1.0:
     resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
     engines: {node: '>=6'}
-    dev: false
 
   /camel-case@4.1.2:
     resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==}
@@ -1308,6 +1380,13 @@ packages:
       supports-color: 2.0.0
     dev: false
 
+  /chalk@4.1.2:
+    resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
+    engines: {node: '>=10'}
+    dependencies:
+      ansi-styles: 4.3.0
+      supports-color: 7.2.0
+
   /chokidar@3.6.0:
     resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
     engines: {node: '>= 8.10.0'}
@@ -1348,6 +1427,15 @@ packages:
       kind-of: 6.0.3
       shallow-clone: 3.0.1
 
+  /color-convert@2.0.1:
+    resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
+    engines: {node: '>=7.0.0'}
+    dependencies:
+      color-name: 1.1.4
+
+  /color-name@1.1.4:
+    resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
+
   /colorette@2.0.20:
     resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
 
@@ -1390,7 +1478,6 @@ packages:
 
   /concat-map@0.0.1:
     resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
-    dev: false
 
   /connect-history-api-fallback@2.0.0:
     resolution: {integrity: sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==}
@@ -1529,6 +1616,9 @@ packages:
     dependencies:
       ms: 2.1.3
 
+  /deep-is@0.1.4:
+    resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
+
   /default-browser-id@5.0.0:
     resolution: {integrity: sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==}
     engines: {node: '>=18'}
@@ -1580,6 +1670,12 @@ packages:
     dependencies:
       '@leichtgewicht/ip-codec': 2.0.5
 
+  /doctrine@3.0.0:
+    resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
+    engines: {node: '>=6.0.0'}
+    dependencies:
+      esutils: 2.0.3
+
   /dom-converter@0.2.0:
     resolution: {integrity: sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==}
     dependencies:
@@ -1708,6 +1804,35 @@ packages:
     engines: {node: '>=0.8.0'}
     dev: false
 
+  /escape-string-regexp@4.0.0:
+    resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
+    engines: {node: '>=10'}
+
+  /eslint-config-prettier@8.10.0(eslint@8.57.1):
+    resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==}
+    hasBin: true
+    peerDependencies:
+      eslint: '>=7.0.0'
+    dependencies:
+      eslint: 8.57.1
+
+  /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0)(eslint@8.57.1)(prettier@2.8.8):
+    resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==}
+    engines: {node: '>=12.0.0'}
+    peerDependencies:
+      eslint: '>=7.28.0'
+      eslint-config-prettier: '*'
+      prettier: '>=2.0.0'
+    peerDependenciesMeta:
+      eslint-config-prettier:
+        optional: true
+    dependencies:
+      eslint: 8.57.1
+      eslint-config-prettier: 8.10.0(eslint@8.57.1)
+      prettier: 2.8.8
+      prettier-linter-helpers: 1.0.0
+    dev: false
+
   /eslint-scope@5.1.1:
     resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
     engines: {node: '>=8.0.0'}
@@ -1715,6 +1840,78 @@ packages:
       esrecurse: 4.3.0
       estraverse: 4.3.0
 
+  /eslint-scope@7.2.2:
+    resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+    dependencies:
+      esrecurse: 4.3.0
+      estraverse: 5.3.0
+
+  /eslint-visitor-keys@3.4.3:
+    resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+
+  /eslint@8.57.1:
+    resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+    deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
+    hasBin: true
+    dependencies:
+      '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1)
+      '@eslint-community/regexpp': 4.12.1
+      '@eslint/eslintrc': 2.1.4
+      '@eslint/js': 8.57.1
+      '@humanwhocodes/config-array': 0.13.0
+      '@humanwhocodes/module-importer': 1.0.1
+      '@nodelib/fs.walk': 1.2.8
+      '@ungap/structured-clone': 1.2.1
+      ajv: 6.12.6
+      chalk: 4.1.2
+      cross-spawn: 7.0.6
+      debug: 4.4.0
+      doctrine: 3.0.0
+      escape-string-regexp: 4.0.0
+      eslint-scope: 7.2.2
+      eslint-visitor-keys: 3.4.3
+      espree: 9.6.1
+      esquery: 1.6.0
+      esutils: 2.0.3
+      fast-deep-equal: 3.1.3
+      file-entry-cache: 6.0.1
+      find-up: 5.0.0
+      glob-parent: 6.0.2
+      globals: 13.24.0
+      graphemer: 1.4.0
+      ignore: 5.3.2
+      imurmurhash: 0.1.4
+      is-glob: 4.0.3
+      is-path-inside: 3.0.3
+      js-yaml: 4.1.0
+      json-stable-stringify-without-jsonify: 1.0.1
+      levn: 0.4.1
+      lodash.merge: 4.6.2
+      minimatch: 3.1.2
+      natural-compare: 1.4.0
+      optionator: 0.9.4
+      strip-ansi: 6.0.1
+      text-table: 0.2.0
+    transitivePeerDependencies:
+      - supports-color
+
+  /espree@9.6.1:
+    resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+    dependencies:
+      acorn: 8.14.0
+      acorn-jsx: 5.3.2(acorn@8.14.0)
+      eslint-visitor-keys: 3.4.3
+
+  /esquery@1.6.0:
+    resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
+    engines: {node: '>=0.10'}
+    dependencies:
+      estraverse: 5.3.0
+
   /esrecurse@4.3.0:
     resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
     engines: {node: '>=4.0'}
@@ -1732,7 +1929,6 @@ packages:
   /esutils@2.0.3:
     resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
     engines: {node: '>=0.10.0'}
-    dev: false
 
   /etag@1.8.1:
     resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
@@ -1801,6 +1997,10 @@ packages:
   /fast-deep-equal@3.1.3:
     resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
 
+  /fast-diff@1.3.0:
+    resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==}
+    dev: false
+
   /fast-glob@3.3.3:
     resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
     engines: {node: '>=8.6.0'}
@@ -1815,6 +2015,9 @@ packages:
   /fast-json-stable-stringify@2.1.0:
     resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
 
+  /fast-levenshtein@2.0.6:
+    resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
+
   /fast-uri@3.0.5:
     resolution: {integrity: sha512-5JnBCWpFlMo0a3ciDy/JckMzzv1U9coZrIhedq+HXxxUfDTAiS0LA8OKVao4G9BxmCVck/jtA5r3KAtRWEyD8Q==}
 
@@ -1826,7 +2029,6 @@ packages:
     resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==}
     dependencies:
       reusify: 1.0.4
-    dev: true
 
   /faye-websocket@0.11.4:
     resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==}
@@ -1834,6 +2036,12 @@ packages:
     dependencies:
       websocket-driver: 0.7.4
 
+  /file-entry-cache@6.0.1:
+    resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
+    engines: {node: ^10.12.0 || >=12.0.0}
+    dependencies:
+      flat-cache: 3.2.0
+
   /file-loader@6.2.0(webpack@5.97.1):
     resolution: {integrity: sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==}
     engines: {node: '>= 10.13.0'}
@@ -1872,10 +2080,28 @@ packages:
       locate-path: 5.0.0
       path-exists: 4.0.0
 
+  /find-up@5.0.0:
+    resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
+    engines: {node: '>=10'}
+    dependencies:
+      locate-path: 6.0.0
+      path-exists: 4.0.0
+
+  /flat-cache@3.2.0:
+    resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==}
+    engines: {node: ^10.12.0 || >=12.0.0}
+    dependencies:
+      flatted: 3.3.2
+      keyv: 4.5.4
+      rimraf: 3.0.2
+
   /flat@5.0.2:
     resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==}
     hasBin: true
 
+  /flatted@3.3.2:
+    resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==}
+
   /follow-redirects@1.15.9:
     resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==}
     engines: {node: '>=4.0'}
@@ -1893,6 +2119,9 @@ packages:
     resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==}
     engines: {node: '>= 0.6'}
 
+  /fs.realpath@1.0.0:
+    resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
+
   /fsevents@2.3.3:
     resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
     engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -1936,11 +2165,27 @@ packages:
     engines: {node: '>=10.13.0'}
     dependencies:
       is-glob: 4.0.3
-    dev: true
 
   /glob-to-regexp@0.4.1:
     resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
 
+  /glob@7.2.3:
+    resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
+    deprecated: Glob versions prior to v9 are no longer supported
+    dependencies:
+      fs.realpath: 1.0.0
+      inflight: 1.0.6
+      inherits: 2.0.4
+      minimatch: 3.1.2
+      once: 1.4.0
+      path-is-absolute: 1.0.1
+
+  /globals@13.24.0:
+    resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
+    engines: {node: '>=8'}
+    dependencies:
+      type-fest: 0.20.2
+
   /globals@9.18.0:
     resolution: {integrity: sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==}
     engines: {node: '>=0.10.0'}
@@ -1965,6 +2210,9 @@ packages:
   /graceful-fs@4.2.11:
     resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
 
+  /graphemer@1.4.0:
+    resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
+
   /handle-thing@2.0.1:
     resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==}
 
@@ -2153,7 +2401,6 @@ packages:
   /ignore@5.3.2:
     resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
     engines: {node: '>= 4'}
-    dev: true
 
   /immutable@5.0.3:
     resolution: {integrity: sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==}
@@ -2165,7 +2412,6 @@ packages:
     dependencies:
       parent-module: 1.0.1
       resolve-from: 4.0.0
-    dev: false
 
   /import-local@3.2.0:
     resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==}
@@ -2175,6 +2421,17 @@ packages:
       pkg-dir: 4.2.0
       resolve-cwd: 3.0.0
 
+  /imurmurhash@0.1.4:
+    resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
+    engines: {node: '>=0.8.19'}
+
+  /inflight@1.0.6:
+    resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
+    deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
+    dependencies:
+      once: 1.4.0
+      wrappy: 1.0.2
+
   /inherits@2.0.3:
     resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==}
 
@@ -2250,6 +2507,10 @@ packages:
     resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
     engines: {node: '>=0.12.0'}
 
+  /is-path-inside@3.0.3:
+    resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
+    engines: {node: '>=8'}
+
   /is-plain-obj@3.0.0:
     resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==}
     engines: {node: '>=10'}
@@ -2306,7 +2567,6 @@ packages:
     hasBin: true
     dependencies:
       argparse: 2.0.1
-    dev: false
 
   /jsesc@0.5.0:
     resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==}
@@ -2318,6 +2578,9 @@ packages:
     hasBin: true
     dev: false
 
+  /json-buffer@3.0.1:
+    resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
+
   /json-parse-even-better-errors@2.3.1:
     resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==}
 
@@ -2327,6 +2590,9 @@ packages:
   /json-schema-traverse@1.0.0:
     resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
 
+  /json-stable-stringify-without-jsonify@1.0.1:
+    resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
+
   /json5@0.5.1:
     resolution: {integrity: sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==}
     hasBin: true
@@ -2345,6 +2611,11 @@ packages:
     hasBin: true
     dev: false
 
+  /keyv@4.5.4:
+    resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
+    dependencies:
+      json-buffer: 3.0.1
+
   /kind-of@6.0.3:
     resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==}
     engines: {node: '>=0.10.0'}
@@ -2355,6 +2626,13 @@ packages:
       picocolors: 1.1.1
       shell-quote: 1.8.2
 
+  /levn@0.4.1:
+    resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
+    engines: {node: '>= 0.8.0'}
+    dependencies:
+      prelude-ls: 1.2.1
+      type-check: 0.4.0
+
   /lines-and-columns@1.2.4:
     resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
     dev: false
@@ -2387,6 +2665,15 @@ packages:
     dependencies:
       p-locate: 4.1.0
 
+  /locate-path@6.0.0:
+    resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
+    engines: {node: '>=10'}
+    dependencies:
+      p-locate: 5.0.0
+
+  /lodash.merge@4.6.2:
+    resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
+
   /lodash@4.17.21:
     resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
 
@@ -2475,7 +2762,6 @@ packages:
     resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
     dependencies:
       brace-expansion: 1.1.11
-    dev: false
 
   /minimist@1.2.8:
     resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
@@ -2506,6 +2792,9 @@ packages:
     engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
     hasBin: true
 
+  /natural-compare@1.4.0:
+    resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
+
   /negotiator@0.6.3:
     resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
     engines: {node: '>= 0.6'}
@@ -2568,6 +2857,11 @@ packages:
     resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==}
     engines: {node: '>= 0.8'}
 
+  /once@1.4.0:
+    resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
+    dependencies:
+      wrappy: 1.0.2
+
   /open@10.1.0:
     resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==}
     engines: {node: '>=18'}
@@ -2577,6 +2871,17 @@ packages:
       is-inside-container: 1.0.0
       is-wsl: 3.1.0
 
+  /optionator@0.9.4:
+    resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
+    engines: {node: '>= 0.8.0'}
+    dependencies:
+      deep-is: 0.1.4
+      fast-levenshtein: 2.0.6
+      levn: 0.4.1
+      prelude-ls: 1.2.1
+      type-check: 0.4.0
+      word-wrap: 1.2.5
+
   /os-homedir@1.0.2:
     resolution: {integrity: sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==}
     engines: {node: '>=0.10.0'}
@@ -2593,12 +2898,24 @@ packages:
     dependencies:
       p-try: 2.2.0
 
+  /p-limit@3.1.0:
+    resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
+    engines: {node: '>=10'}
+    dependencies:
+      yocto-queue: 0.1.0
+
   /p-locate@4.1.0:
     resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==}
     engines: {node: '>=8'}
     dependencies:
       p-limit: 2.3.0
 
+  /p-locate@5.0.0:
+    resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
+    engines: {node: '>=10'}
+    dependencies:
+      p-limit: 3.1.0
+
   /p-retry@6.2.1:
     resolution: {integrity: sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==}
     engines: {node: '>=16.17'}
@@ -2623,7 +2940,6 @@ packages:
     engines: {node: '>=6'}
     dependencies:
       callsites: 3.1.0
-    dev: false
 
   /parse-json@5.2.0:
     resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
@@ -2659,7 +2975,6 @@ packages:
   /path-is-absolute@1.0.1:
     resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
     engines: {node: '>=0.10.0'}
-    dev: false
 
   /path-key@3.1.1:
     resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
@@ -2772,6 +3087,22 @@ packages:
       picocolors: 1.1.1
       source-map-js: 1.2.1
 
+  /prelude-ls@1.2.1:
+    resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
+    engines: {node: '>= 0.8.0'}
+
+  /prettier-linter-helpers@1.0.0:
+    resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
+    engines: {node: '>=6.0.0'}
+    dependencies:
+      fast-diff: 1.3.0
+    dev: false
+
+  /prettier@2.8.8:
+    resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
+    engines: {node: '>=10.13.0'}
+    hasBin: true
+
   /pretty-error@4.0.0:
     resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==}
     dependencies:
@@ -2806,7 +3137,6 @@ packages:
 
   /queue-microtask@1.2.3:
     resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
-    dev: true
 
   /randombytes@2.1.0:
     resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
@@ -2935,7 +3265,6 @@ packages:
   /resolve-from@4.0.0:
     resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
     engines: {node: '>=4'}
-    dev: false
 
   /resolve-from@5.0.0:
     resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
@@ -2957,7 +3286,13 @@ packages:
   /reusify@1.0.4:
     resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
     engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
-    dev: true
+
+  /rimraf@3.0.2:
+    resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
+    deprecated: Rimraf versions prior to v4 are no longer supported
+    hasBin: true
+    dependencies:
+      glob: 7.2.3
 
   /run-applescript@7.0.0:
     resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==}
@@ -2967,7 +3302,6 @@ packages:
     resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
     dependencies:
       queue-microtask: 1.2.3
-    dev: true
 
   /safe-buffer@5.1.2:
     resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
@@ -3261,13 +3595,22 @@ packages:
     engines: {node: '>=8'}
     dependencies:
       ansi-regex: 5.0.1
-    dev: true
+
+  /strip-json-comments@3.1.1:
+    resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
+    engines: {node: '>=8'}
 
   /supports-color@2.0.0:
     resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}
     engines: {node: '>=0.8.0'}
     dev: false
 
+  /supports-color@7.2.0:
+    resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
+    engines: {node: '>=8'}
+    dependencies:
+      has-flag: 4.0.0
+
   /supports-color@8.1.1:
     resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
     engines: {node: '>=10'}
@@ -3315,6 +3658,9 @@ packages:
       commander: 2.20.3
       source-map-support: 0.5.21
 
+  /text-table@0.2.0:
+    resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
+
   /thingies@1.21.0(tslib@2.8.1):
     resolution: {integrity: sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==}
     engines: {node: '>=10.18'}
@@ -3357,6 +3703,16 @@ packages:
   /tslib@2.8.1:
     resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
 
+  /type-check@0.4.0:
+    resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
+    engines: {node: '>= 0.8.0'}
+    dependencies:
+      prelude-ls: 1.2.1
+
+  /type-fest@0.20.2:
+    resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
+    engines: {node: '>=10'}
+
   /type-is@1.6.18:
     resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
     engines: {node: '>= 0.6'}
@@ -3607,6 +3963,13 @@ packages:
   /wildcard@2.0.1:
     resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==}
 
+  /word-wrap@1.2.5:
+    resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
+    engines: {node: '>=0.10.0'}
+
+  /wrappy@1.0.2:
+    resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+
   /ws@8.18.0:
     resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==}
     engines: {node: '>=10.0.0'}
@@ -3618,3 +3981,7 @@ packages:
         optional: true
       utf-8-validate:
         optional: true
+
+  /yocto-queue@0.1.0:
+    resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
+    engines: {node: '>=10'}

+ 1 - 1
src/404.js

@@ -1 +1 @@
-import "./style/error/404.css"
+import './style/error/404.css'

+ 1 - 1
src/4xx.js

@@ -1 +1 @@
-import "./style/error/4xx.css"
+import './style/error/4xx.css'

+ 1 - 1
src/5xx.js

@@ -1 +1 @@
-import "./style/error/5xx.css"
+import './style/error/5xx.css'

+ 12 - 12
src/common.js

@@ -1,18 +1,18 @@
 // 清理状态
-import "normalize.css"
+import 'normalize.css'
 
-import Logo from "./assets/image/logo.png"
-import WangAn from "./assets/image/wangan.png"
-import SongZihuan from "./assets/image/songzihuan.jpg"
-import LogoBin from "./assets/image/logo_big.png"
+import Logo from './assets/image/logo.png'
+import WangAn from './assets/image/wangan.png'
+import SongZihuan from './assets/image/songzihuan.jpg'
+import LogoBin from './assets/image/logo_big.png'
 
-document.addEventListener('DOMContentLoaded', function() {
-    // 动态设置favicon
-    let link = document.createElement('link');
-    link.rel = 'shortcut icon';
-    link.href = Logo; // 或者 favicon.png 对于PNG格式
-    document.head.appendChild(link);
-});
+document.addEventListener('DOMContentLoaded', function () {
+  // 动态设置favicon
+  const link = document.createElement('link')
+  link.rel = 'shortcut icon'
+  link.href = Logo // 或者 favicon.png 对于PNG格式
+  document.head.appendChild(link)
+})
 
 window.Logo = Logo
 window.WangAn = WangAn

+ 1 - 2
src/index.js

@@ -1,2 +1 @@
-import "/src/style/index/index.css"
-
+import '/src/style/index/index.css'

+ 1 - 1
src/license.js

@@ -1 +1 @@
-import "/src/style/index/license.css"
+import '/src/style/index/license.css'

+ 1 - 1
src/mitorg.js

@@ -1 +1 @@
-import "/src/style/index/mitorg.css"
+import '/src/style/index/mitorg.css'

+ 1 - 1
src/new.js

@@ -1 +1 @@
-import "/src/style/index/new.css"
+import '/src/style/index/new.css'

+ 1 - 1
src/signal.js

@@ -1 +1 @@
-// 空白,无任何引入
+// 空白,无任何引入

+ 34 - 32
src/utils/file.js

@@ -1,43 +1,45 @@
-const path = require("node:path");
-const fs = require("fs");
+const path = require('node:path')
+const fs = require('fs')
 
 module.exports = {
-    getAllFilePaths,
+  getAllFilePaths
 }
 
 function getAllFilePaths(dir) {
-    return _getAllFilePaths(dir , "./", 5)
+  return _getAllFilePaths(dir, './', 5)
 }
 
-
 function _getAllFilePaths(filePath, localpath, deep) {
-    if (deep === 0) {
-        return [], []
+  if (deep === 0) {
+    return [], []
+  }
+
+  let filePathResult = []
+  let localPathResult = []
+
+  // 读取目录中的所有文件和子目录
+  fs.readdirSync(filePath).forEach(function (file) {
+    const newFilePath = path.join(filePath, file)
+    const newLocalPath = path.join(localpath, file)
+
+    // 如果是目录,则递归读取该目录下的文件
+    if (fs.statSync(newFilePath).isDirectory()) {
+      const { filePathResult: _filrPath, localPathResult: _localPath } = _getAllFilePaths(
+        newFilePath,
+        newLocalPath,
+        deep - 1
+      )
+      filePathResult = filePathResult.concat(_filrPath)
+      localPathResult = localPathResult.concat(_localPath)
+    } else {
+      // 如果是文件,则直接加入结果数组
+      filePathResult.push(newFilePath)
+      localPathResult.push(newLocalPath)
     }
+  })
 
-    let filePathResult = [];
-    let localPathResult = []
-
-    // 读取目录中的所有文件和子目录
-    fs.readdirSync(filePath).forEach(function(file) {
-        let newFilePath = path.join(filePath, file);
-        let newLocalPath = path.join(localpath, file);
-
-
-        // 如果是目录,则递归读取该目录下的文件
-        if (fs.statSync(newFilePath).isDirectory()) {
-            let { filePathResult: _filrPath,localPathResult:  _localPath} =_getAllFilePaths(newFilePath, newLocalPath, deep-1)
-            filePathResult = filePathResult.concat(_filrPath)
-            localPathResult = localPathResult.concat(_localPath)
-        } else {
-            // 如果是文件,则直接加入结果数组
-            filePathResult.push(newFilePath);
-            localPathResult.push(newLocalPath);
-        }
-    });
-
-    return {
-        filePathResult,
-        localPathResult,
-    }
+  return {
+    filePathResult,
+    localPathResult
+  }
 }

+ 259 - 0
webpack_config_dev.cjs

@@ -0,0 +1,259 @@
+const path = require('path')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+const filetool = require('./src/utils/file.js')
+
+const mode = 'development'
+const dist_name = 'dist-dev'
+
+const HTMMLPlugin = []
+
+const { localPathResult: AllHTMLLocalFile4xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
+AllHTMLLocalFile4xx.forEach((filePath) => {
+  if (!filePath.endsWith('.html')) {
+    return
+  }
+
+  if (filePath.includes('signal.html')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+        filename: path.join('error/4xx', filePath),
+        chunks: ['signal'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  if (filePath.includes('400.html')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+        filename: path.join('error/4xx', filePath),
+        chunks: ['common', 'err404'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  HTMMLPlugin.push(
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+      filename: path.join('error/4xx', filePath),
+      chunks: ['common', 'err4xx'],
+      publicPath: '../../'
+    })
+  )
+})
+
+const { localPathResult: AllHTMLLocalFile5xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
+AllHTMLLocalFile5xx.forEach((filePath) => {
+  if (!filePath.endsWith('.html')) {
+    return
+  }
+
+  if (filePath.includes('signal.html')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/5xx', filePath), //指定模板文件
+        filename: path.join('error/5xx', filePath),
+        chunks: ['signal'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  HTMMLPlugin.push(
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/5xx', filePath), //指定模板文件
+      filename: path.join('error/5xx', filePath),
+      chunks: ['common', 'err5xx'],
+      publicPath: '../../'
+    })
+  )
+})
+
+module.exports = {
+  mode: mode,
+
+  context: __dirname,
+
+  performance: {
+    hints: 'warning', // 或者 'error',取决于你希望如何处理超出限制的情况
+    maxAssetSize: 5000000, // 设置单个资源的最大尺寸,例如5MB
+    maxEntrypointSize: 10000000 // 设置入口起点的最大尺寸,例如10MB
+  },
+
+  entry: {
+    common: path.resolve(__dirname, 'src/common.js'),
+    index: path.resolve(__dirname, 'src/index.js'),
+    signal: path.resolve(__dirname, 'src/signal.js'),
+    new: path.resolve(__dirname, 'src/new.js'),
+    license: path.resolve(__dirname, 'src/license.js'),
+    mitorg: path.resolve(__dirname, 'src/mitorg.js'),
+    err4xx: path.resolve(__dirname, 'src/4xx.js'),
+    err404: path.resolve(__dirname, 'src/404.js'),
+    err5xx: path.resolve(__dirname, 'src/5xx.js')
+  },
+
+  output: {
+    path: path.resolve(__dirname, dist_name), //打包后的文件存放的地方
+    filename: 'js/[name].[fullhash].bundle.js', //打包后输出文件的文件名
+    chunkFilename: '[name].bundle.js',
+    clean: true,
+    charset: true,
+    publicPath: '/'
+  },
+
+  resolve: {
+    alias: {
+      '@': path.join(__dirname, 'src')
+    }
+  },
+
+  module: {
+    rules: [
+      {
+        test: /\.(css|scss|sass)$/,
+        use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader']
+      },
+      {
+        test: /\.(png|jpg|jpeg|svg|gif)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'images', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.(mp4|m4v|avi|mov|qt|wmv|mkv|flv|webm|mpeg|mpg|3gp|3g2)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'videos', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.(woff|woff2|eot|ttf|otf)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'fonts', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.html$/i,
+        loader: 'html-loader'
+      },
+      {
+        test: require.resolve('jquery'),
+        loader: 'expose-loader',
+        options: {
+          exposes: ['$', 'jQuery']
+        }
+      }
+    ]
+  },
+
+  plugins: [
+    new CopyWebpackPlugin({
+      patterns: [
+        { from: 'public', to: './' },
+        { from: './config.json', to: './SH_CONFIG.json' },
+        { from: './LICENSE', to: './' },
+        { from: './LICENSE_CN', to: './' }
+      ]
+    }),
+    ...HTMMLPlugin,
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'index.html'), //指定模板文件
+      filename: 'index.html',
+      chunks: ['common', 'index'],
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/LICENSE_US.html'), //指定模板文件
+      filename: 'LICENSE_US.html',
+      chunks: ['common', 'license'],
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/LICENSE_CN.html'), //指定模板文件
+      filename: 'LICENSE_CN.html',
+      chunks: ['common', 'license'],
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/mitorg.html'), //指定模板文件
+      filename: 'mitorg.html',
+      chunks: ['common', 'mitorg'],
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/index.new.signal.html'), //指定模板文件
+      filename: 'index.new.signal.html',
+      chunks: ['common', 'new', 'signal'], // 此signal要设置common
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/index.new.html'), //指定模板文件
+      filename: 'index.new.html',
+      chunks: ['common', 'new'],
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/4xx/404.signal.html'), //指定模板文件
+      filename: '404.html',
+      chunks: ['common', 'signal'], // 该signal要设置common
+      publicPath: './'
+    }),
+    new MiniCssExtractPlugin({
+      filename: 'style/[name].[fullhash].bundle.css',
+      chunkFilename: 'css/[id].bundle.css'
+    })
+  ],
+
+  devServer: {
+    static: {
+      directory: path.join(__dirname, dist_name)
+    },
+    compress: true,
+    port: 1001,
+    open: true,
+    hot: true
+  }
+}

+ 0 - 255
webpack_config_dev.js

@@ -1,255 +0,0 @@
-const path = require('path');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const MiniCssExtractPlugin = require("mini-css-extract-plugin");
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const filetool = require("./src/utils/file.js")
-
-const mode = "development"
-const dist_name = "dist-dev"
-
-const HTMMLPlugin = []
-
-const { localPathResult: AllHTMLLocalFile4xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
-AllHTMLLocalFile4xx.forEach((filePath) => {
-  if (!filePath.endsWith(".html")) {
-    return
-  }
-
-  if(filePath.includes("signal.html")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-      filename: path.join("error/4xx", filePath),
-      chunks: ["signal"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-  if(filePath.includes("400.html")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-      filename: path.join("error/4xx", filePath),
-      chunks: ["common", "err404"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-
-  HTMMLPlugin.push(new HtmlWebpackPlugin({
-    inject:'body',
-    template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-    filename: path.join("error/4xx", filePath),
-    chunks: ["common", "err4xx"],
-    publicPath: "../../"
-  }))
-})
-
-const { localPathResult: AllHTMLLocalFile5xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
-AllHTMLLocalFile5xx.forEach((filePath) => {
-  if (!filePath.endsWith(".html")) {
-    return
-  }
-
-  if(filePath.includes("signal.html")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/5xx', filePath),  //指定模板文件
-      filename: path.join("error/5xx", filePath),
-      chunks: ["signal"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-  HTMMLPlugin.push(new HtmlWebpackPlugin({
-    inject:'body',
-    template: path.resolve(__dirname, 'src/html/error/5xx', filePath),  //指定模板文件
-    filename: path.join("error/5xx", filePath),
-    chunks: ["common", "err5xx"],
-    publicPath: "../../"
-  }))
-})
-
-module.exports = {
-  mode: mode,
-
-  context: __dirname,
-
-  performance: {
-    hints: 'warning', // 或者 'error',取决于你希望如何处理超出限制的情况
-    maxAssetSize: 5000000, // 设置单个资源的最大尺寸,例如5MB
-    maxEntrypointSize: 10000000, // 设置入口起点的最大尺寸,例如10MB
-  },
-
-  entry: {
-    common: path.resolve(__dirname, 'src/common.js'),
-    index: path.resolve(__dirname, 'src/index.js'),
-    signal: path.resolve(__dirname, 'src/signal.js'),
-    new: path.resolve(__dirname, 'src/new.js'),
-    license: path.resolve(__dirname, 'src/license.js'),
-    mitorg: path.resolve(__dirname, 'src/mitorg.js'),
-    err4xx: path.resolve(__dirname, 'src/4xx.js'),
-    err404: path.resolve(__dirname, 'src/404.js'),
-    err5xx: path.resolve(__dirname, 'src/5xx.js'),
-  },
-
-  output: {
-    path: path.resolve(__dirname, dist_name),  //打包后的文件存放的地方
-    filename: 'js/[name].[fullhash].bundle.js',  //打包后输出文件的文件名
-    chunkFilename: '[name].bundle.js',
-    clean: true,
-    charset: true,
-    publicPath: "/"
-  },
-
-  resolve: {
-    alias: {
-      "@": path.join(__dirname, "src")
-    }
-  },
-
-  module: {
-    rules: [
-      {
-        test: /\.(css|scss|sass)$/,
-        use: [
-          MiniCssExtractPlugin.loader,
-          'css-loader',
-          'postcss-loader',
-          'sass-loader',
-        ],
-      },
-      {
-        test:/\.(png|jpg|jpeg|svg|gif)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'images', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test:/\.(mp4|m4v|avi|mov|qt|wmv|mkv|flv|webm|mpeg|mpg|3gp|3g2)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'videos', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test: /\.(woff|woff2|eot|ttf|otf)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'fonts', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test: /\.html$/i,
-        loader: "html-loader",
-      },
-      {
-        test: require.resolve("jquery"),
-        loader: "expose-loader",
-        options: {
-          exposes: ["$", "jQuery"],
-        },
-      },
-    ],
-  },
-
-  plugins: [
-    new CopyWebpackPlugin({
-      patterns: [
-        { from: 'public', to: './' },
-        { from: './config.json', to: './SH_CONFIG.json' },
-        { from: './LICENSE', to: './' },
-        { from: './LICENSE_CN', to: './' },
-      ],
-    }),
-    ...HTMMLPlugin,
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html", "index.html"),  //指定模板文件
-      filename: "index.html",
-      chunks: ["common", "index"],
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/LICENSE_US.html'),  //指定模板文件
-      filename: "LICENSE_US.html",
-      chunks: ["common", "license"],
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/LICENSE_CN.html'),  //指定模板文件
-      filename: "LICENSE_CN.html",
-      chunks: ["common", "license"],
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/mitorg.html'),  //指定模板文件
-      filename: "mitorg.html",
-      chunks: ["common", "mitorg"],
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/index.new.signal.html'),  //指定模板文件
-      filename: "index.new.signal.html",
-      chunks: ["common", "new", "signal"],  // 此signal要设置common
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/index.new.html'),  //指定模板文件
-      filename: "index.new.html",
-      chunks: ["common", "new"],
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx/404.signal.html'),  //指定模板文件
-      filename: "404.html",
-      chunks: ["common", "signal"],  // 该signal要设置common
-      publicPath: "./",
-    }),
-    new MiniCssExtractPlugin({
-      filename: 'style/[name].[fullhash].bundle.css',
-      chunkFilename: 'css/[id].bundle.css',
-    }),
-  ],
-
-  devServer: {
-    static: {
-      directory: path.join(__dirname, dist_name),
-    },
-    compress: true,
-    port: 1001,
-    open: true,
-    hot: true,
-  },
-};

+ 294 - 0
webpack_config_github.cjs

@@ -0,0 +1,294 @@
+const path = require('path')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const filetool = require('./src/utils/file.js')
+const TerserPlugin = require('terser-webpack-plugin')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+
+const mode = 'production'
+const dist_name = 'docs'
+
+const html_minify = {
+  collapseWhitespace: true,
+  removeComments: true,
+  removeRedundantAttributes: true,
+  useShortDoctype: true,
+  removeEmptyAttributes: true,
+  removeStyleLinkTypeAttributes: true,
+  keepClosingSlash: true,
+  minifyJS: true,
+  minifyCSS: true,
+  minifyURLs: true
+}
+
+const HTMMLPlugin = []
+
+const { localPathResult: AllHTMLLocalFile4xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
+AllHTMLLocalFile4xx.forEach((filePath) => {
+  if (!filePath.endsWith('.html')) {
+    return
+  }
+
+  if (filePath.includes('signal')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+        filename: path.join('error/4xx', filePath),
+        chunks: ['signal'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  if (filePath.includes('404')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+        filename: path.join('error/4xx', filePath),
+        chunks: ['common', 'err404'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  HTMMLPlugin.push(
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+      filename: path.join('error/4xx', filePath),
+      chunks: ['common', 'err4xx'],
+      publicPath: '../../'
+    })
+  )
+})
+
+const { localPathResult: AllHTMLLocalFile5xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
+AllHTMLLocalFile5xx.forEach((filePath) => {
+  if (!filePath.endsWith('.html')) {
+    return
+  }
+
+  if (filePath.includes('signal')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/5xx', filePath), //指定模板文件
+        filename: path.join('error/5xx', filePath),
+        chunks: ['signal'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  HTMMLPlugin.push(
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/5xx', filePath), //指定模板文件
+      filename: path.join('error/5xx', filePath),
+      chunks: ['common', 'err5xx'],
+      publicPath: '../../'
+    })
+  )
+})
+
+module.exports = {
+  mode: mode,
+
+  context: __dirname,
+
+  performance: {
+    hints: 'warning', // 或者 'error',取决于你希望如何处理超出限制的情况
+    maxAssetSize: 5000000, // 设置单个资源的最大尺寸,例如5MB
+    maxEntrypointSize: 10000000 // 设置入口起点的最大尺寸,例如10MB
+  },
+
+  entry: {
+    common: path.resolve(__dirname, 'src/common.js'),
+    index: path.resolve(__dirname, 'src/index.js'),
+    signal: path.resolve(__dirname, 'src/signal.js'),
+    new: path.resolve(__dirname, 'src/new.js'),
+    license: path.resolve(__dirname, 'src/license.js'),
+    mitorg: path.resolve(__dirname, 'src/mitorg.js'),
+    err4xx: path.resolve(__dirname, 'src/4xx.js'),
+    err404: path.resolve(__dirname, 'src/404.js'),
+    err5xx: path.resolve(__dirname, 'src/5xx.js')
+  },
+
+  output: {
+    path: path.resolve(__dirname, dist_name), //打包后的文件存放的地方
+    filename: 'js/[name].[fullhash].bundle.js', //打包后输出文件的文件名
+    chunkFilename: '[name].bundle.js',
+    clean: true,
+    charset: true,
+    publicPath: '/'
+  },
+
+  resolve: {
+    alias: {
+      '@': path.join(__dirname, 'src')
+    }
+  },
+
+  optimization: {
+    minimize: true,
+    minimizer: [
+      new TerserPlugin({
+        terserOptions: {
+          compress: {
+            drop_console: true, // 移除console.log (Github/发布版专属)
+            drop_debugger: true // 移除debugger (Github/发布版专属)
+          }
+        }
+      })
+    ]
+  },
+
+  module: {
+    rules: [
+      {
+        test: /\.(css|scss|sass)$/,
+        use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader']
+      },
+      {
+        test: /\.(png|jpg|jpeg|svg|gif)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'images', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.(mp4|m4v|avi|mov|qt|wmv|mkv|flv|webm|mpeg|mpg|3gp|3g2)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'videos', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.(woff|woff2|eot|ttf|otf)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'fonts', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.html$/i,
+        loader: 'html-loader'
+      },
+      {
+        test: require.resolve('jquery'),
+        loader: 'expose-loader',
+        options: {
+          exposes: ['$', 'jQuery']
+        }
+      }
+    ]
+  },
+
+  plugins: [
+    new CopyWebpackPlugin({
+      patterns: [
+        { from: 'public', to: './' },
+        { from: './config.json', to: './SH_CONFIG.json' },
+        { from: './LICENSE', to: './' },
+        { from: './LICENSE_CN', to: './' }
+      ]
+    }),
+    ...HTMMLPlugin,
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'index.html'), //指定模板文件
+      filename: 'index.html',
+      chunks: ['common', 'index'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'LICENSE_US.html'), //指定模板文件
+      filename: 'LICENSE_US.html',
+      chunks: ['common', 'license'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'LICENSE_CN.html'), //指定模板文件
+      filename: 'LICENSE_CN.html',
+      chunks: ['common', 'license'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'mitorg.html'), //指定模板文件
+      filename: 'mitorg.html',
+      chunks: ['common', 'mitorg'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'index.new.signal.html'), //指定模板文件
+      filename: 'index.new.signal.html',
+      chunks: ['common', 'new', 'signal'], // 此signal要设置common
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'index.new.html'), //指定模板文件
+      filename: 'index.new.html',
+      chunks: ['common', 'new'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/4xx/404.signal.html'), //指定模板文件
+      filename: '404.html',
+      chunks: ['common', 'signal'], // 此signal要设置common
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new MiniCssExtractPlugin({
+      filename: 'style/[name].[hash].bundle.css',
+      chunkFilename: 'css/[id].bundle.css'
+    })
+  ],
+
+  devServer: {
+    static: {
+      directory: path.join(__dirname, dist_name)
+    },
+    compress: true,
+    port: 1001,
+    open: true,
+    hot: false
+  }
+}

+ 0 - 290
webpack_config_github.js

@@ -1,290 +0,0 @@
-const path = require('path');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const MiniCssExtractPlugin = require("mini-css-extract-plugin");
-const filetool = require("./src/utils/file.js")
-const TerserPlugin = require('terser-webpack-plugin');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-
-const mode = "production"
-const dist_name = "docs"
-
-const html_minify = {
-  collapseWhitespace: true,
-  removeComments: true,
-  removeRedundantAttributes: true,
-  useShortDoctype: true,
-  removeEmptyAttributes: true,
-  removeStyleLinkTypeAttributes: true,
-  keepClosingSlash: true,
-  minifyJS: true,
-  minifyCSS: true,
-  minifyURLs: true,
-}
-
-const HTMMLPlugin = []
-
-const { localPathResult: AllHTMLLocalFile4xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
-AllHTMLLocalFile4xx.forEach((filePath) => {
-  if (!filePath.endsWith(".html")) {
-    return
-  }
-
-  if(filePath.includes("signal")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-      filename: path.join("error/4xx", filePath),
-      chunks: ["signal"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-  if(filePath.includes("404")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-      filename: path.join("error/4xx", filePath),
-      chunks: ["common", "err404"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-
-  HTMMLPlugin.push(new HtmlWebpackPlugin({
-    inject:'body',
-    template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-    filename: path.join("error/4xx", filePath),
-    chunks: ["common", "err4xx"],
-    publicPath: "../../"
-  }))
-})
-
-const { localPathResult: AllHTMLLocalFile5xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
-AllHTMLLocalFile5xx.forEach((filePath) => {
-  if (!filePath.endsWith(".html")) {
-    return
-  }
-
-  if(filePath.includes("signal")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/5xx', filePath),  //指定模板文件
-      filename: path.join("error/5xx", filePath),
-      chunks: ["signal"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-  HTMMLPlugin.push(new HtmlWebpackPlugin({
-    inject:'body',
-    template: path.resolve(__dirname, 'src/html/error/5xx', filePath),  //指定模板文件
-    filename: path.join("error/5xx", filePath),
-    chunks: ["common", "err5xx"],
-    publicPath: "../../"
-  }))
-})
-
-module.exports = {
-  mode: mode,
-
-  context: __dirname,
-
-  performance: {
-    hints: 'warning', // 或者 'error',取决于你希望如何处理超出限制的情况
-    maxAssetSize: 5000000, // 设置单个资源的最大尺寸,例如5MB
-    maxEntrypointSize: 10000000, // 设置入口起点的最大尺寸,例如10MB
-  },
-
-  entry: {
-    common: path.resolve(__dirname, 'src/common.js'),
-    index: path.resolve(__dirname, 'src/index.js'),
-    signal: path.resolve(__dirname, 'src/signal.js'),
-    new: path.resolve(__dirname, 'src/new.js'),
-    license: path.resolve(__dirname, 'src/license.js'),
-    mitorg: path.resolve(__dirname, 'src/mitorg.js'),
-    err4xx: path.resolve(__dirname, 'src/4xx.js'),
-    err404: path.resolve(__dirname, 'src/404.js'),
-    err5xx: path.resolve(__dirname, 'src/5xx.js'),
-  },
-
-  output: {
-    path: path.resolve(__dirname, dist_name),  //打包后的文件存放的地方
-    filename: 'js/[name].[fullhash].bundle.js',  //打包后输出文件的文件名
-    chunkFilename: '[name].bundle.js',
-    clean: true,
-    charset: true,
-    publicPath: "/"
-  },
-
-  resolve: {
-    alias: {
-      "@": path.join(__dirname, "src")
-    }
-  },
-
-  optimization: {
-    minimize: true,
-    minimizer: [
-      new TerserPlugin({
-        terserOptions: {
-          compress: {
-            drop_console: true, // 移除console.log (Github/发布版专属)
-            drop_debugger: true, // 移除debugger (Github/发布版专属)
-          },
-        },
-      }),
-    ],
-  },
-
-  module: {
-    rules: [
-      {
-        test: /\.(css|scss|sass)$/,
-        use: [
-          MiniCssExtractPlugin.loader,
-          'css-loader',
-          'postcss-loader',
-          'sass-loader',
-        ],
-      },
-      {
-        test:/\.(png|jpg|jpeg|svg|gif)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'images', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test:/\.(mp4|m4v|avi|mov|qt|wmv|mkv|flv|webm|mpeg|mpg|3gp|3g2)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'videos', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test: /\.(woff|woff2|eot|ttf|otf)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'fonts', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test: /\.html$/i,
-        loader: "html-loader",
-      },
-      {
-        test: require.resolve("jquery"),
-        loader: "expose-loader",
-        options: {
-          exposes: ["$", "jQuery"],
-        },
-      },
-    ],
-  },
-
-  plugins: [
-    new CopyWebpackPlugin({
-      patterns: [
-        { from: 'public', to: './' },
-        { from: './config.json', to: './SH_CONFIG.json' },
-        { from: './LICENSE', to: './' },
-        { from: './LICENSE_CN', to: './' },
-      ],
-    }),
-    ...HTMMLPlugin,
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html", "index.html"),  //指定模板文件
-      filename: "index.html",
-      chunks: ["common", "index"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","LICENSE_US.html"),  //指定模板文件
-      filename: "LICENSE_US.html",
-      chunks: ["common", "license"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","LICENSE_CN.html"),  //指定模板文件
-      filename: "LICENSE_CN.html",
-      chunks: ["common", "license"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","mitorg.html"),  //指定模板文件
-      filename: "mitorg.html",
-      chunks: ["common", "mitorg"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","index.new.signal.html"),  //指定模板文件
-      filename: "index.new.signal.html",
-      chunks: ["common", "new", "signal"],  // 此signal要设置common
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","index.new.html"),  //指定模板文件
-      filename: "index.new.html",
-      chunks: ["common", "new"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx/404.signal.html'),  //指定模板文件
-      filename: "404.html",
-      chunks: ["common", "signal"],  // 此signal要设置common
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new MiniCssExtractPlugin({
-      filename: 'style/[name].[hash].bundle.css',
-      chunkFilename: 'css/[id].bundle.css',
-    }),
-  ],
-
-  devServer: {
-    static: {
-      directory: path.join(__dirname, dist_name),
-    },
-    compress: true,
-    port: 1001,
-    open: true,
-    hot: false,
-  },
-};

+ 279 - 0
webpack_config_prod.cjs

@@ -0,0 +1,279 @@
+const path = require('path')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const filetool = require('./src/utils/file.js')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
+
+const mode = 'production'
+const dist_name = 'dist-prod'
+
+const html_minify = {
+  collapseWhitespace: true,
+  removeComments: true,
+  removeRedundantAttributes: true,
+  useShortDoctype: true,
+  removeEmptyAttributes: true,
+  removeStyleLinkTypeAttributes: true,
+  keepClosingSlash: true,
+  minifyJS: true,
+  minifyCSS: true,
+  minifyURLs: true
+}
+
+const HTMMLPlugin = []
+
+const { localPathResult: AllHTMLLocalFile4xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
+AllHTMLLocalFile4xx.forEach((filePath) => {
+  if (!filePath.endsWith('.html')) {
+    return
+  }
+
+  if (filePath.includes('signal.html')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+        filename: path.join('error/4xx', filePath),
+        chunks: ['signal'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  if (filePath.includes('400.html')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+        filename: path.join('error/4xx', filePath),
+        chunks: ['common', 'err404'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  HTMMLPlugin.push(
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/4xx', filePath), //指定模板文件
+      filename: path.join('error/4xx', filePath),
+      chunks: ['common', 'err4xx'],
+      publicPath: '../../'
+    })
+  )
+})
+
+const { localPathResult: AllHTMLLocalFile5xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
+AllHTMLLocalFile5xx.forEach((filePath) => {
+  if (!filePath.endsWith('.html')) {
+    return
+  }
+
+  if (filePath.includes('signal.html')) {
+    HTMMLPlugin.push(
+      new HtmlWebpackPlugin({
+        inject: 'body',
+        template: path.resolve(__dirname, 'src/html/error/5xx', filePath), //指定模板文件
+        filename: path.join('error/5xx', filePath),
+        chunks: ['signal'],
+        publicPath: '../../'
+      })
+    )
+    return
+  }
+
+  HTMMLPlugin.push(
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/5xx', filePath), //指定模板文件
+      filename: path.join('error/5xx', filePath),
+      chunks: ['common', 'err5xx'],
+      publicPath: '../../'
+    })
+  )
+})
+
+module.exports = {
+  mode: mode,
+
+  context: __dirname,
+
+  performance: {
+    hints: 'warning', // 或者 'error',取决于你希望如何处理超出限制的情况
+    maxAssetSize: 5000000, // 设置单个资源的最大尺寸,例如5MB
+    maxEntrypointSize: 10000000 // 设置入口起点的最大尺寸,例如10MB
+  },
+
+  entry: {
+    common: path.resolve(__dirname, 'src/common.js'),
+    index: path.resolve(__dirname, 'src/index.js'),
+    signal: path.resolve(__dirname, 'src/signal.js'),
+    new: path.resolve(__dirname, 'src/new.js'),
+    license: path.resolve(__dirname, 'src/license.js'),
+    mitorg: path.resolve(__dirname, 'src/mitorg.js'),
+    err4xx: path.resolve(__dirname, 'src/4xx.js'),
+    err404: path.resolve(__dirname, 'src/404.js'),
+    err5xx: path.resolve(__dirname, 'src/5xx.js')
+  },
+
+  output: {
+    path: path.resolve(__dirname, dist_name), //打包后的文件存放的地方
+    filename: 'js/[name].[fullhash].bundle.js', //打包后输出文件的文件名
+    chunkFilename: '[name].bundle.js',
+    clean: true,
+    charset: true,
+    publicPath: '/'
+  },
+
+  resolve: {
+    alias: {
+      '@': path.join(__dirname, 'src')
+    }
+  },
+
+  module: {
+    rules: [
+      {
+        test: /\.(css|scss|sass)$/,
+        use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader']
+      },
+      {
+        test: /\.(png|jpg|jpeg|svg|gif)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'images', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.(mp4|m4v|avi|mov|qt|wmv|mkv|flv|webm|mpeg|mpg|3gp|3g2)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'videos', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.(woff|woff2|eot|ttf|otf)$/i,
+        use: [
+          {
+            loader: 'url-loader',
+            options: {
+              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
+              fallback: 'file-loader',
+              outputPath: 'fonts', // 类似于 file-loader 的配置
+              name: '[name].[fullhash].[ext]'
+            }
+          }
+        ]
+      },
+      {
+        test: /\.html$/i,
+        loader: 'html-loader'
+      },
+      {
+        test: require.resolve('jquery'),
+        loader: 'expose-loader',
+        options: {
+          exposes: ['$', 'jQuery']
+        }
+      }
+    ]
+  },
+
+  plugins: [
+    new CopyWebpackPlugin({
+      patterns: [
+        { from: 'public', to: './' },
+        { from: './config.json', to: './SH_CONFIG.json' },
+        { from: './LICENSE', to: './' },
+        { from: './LICENSE_CN', to: './' }
+      ]
+    }),
+    ...HTMMLPlugin,
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'index.html'), //指定模板文件
+      filename: 'index.html',
+      chunks: ['common', 'index'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'LICENSE_US.html'), //指定模板文件
+      filename: 'LICENSE_US.html',
+      chunks: ['common', 'license'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/LICENSE_CN.html'), //指定模板文件
+      filename: 'LICENSE_CN.html',
+      chunks: ['common', 'license'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'mitorg.html'), //指定模板文件
+      filename: 'mitorg.html',
+      chunks: ['common', 'mitorg'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'index.new.signal.html'), //指定模板文件
+      filename: 'index.new.signal.html',
+      chunks: ['common', 'new', 'signal'], // 此signal要设置common
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src', 'html', 'index.new.html'), //指定模板文件
+      filename: 'index.new.html',
+      chunks: ['common', 'new'],
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new HtmlWebpackPlugin({
+      inject: 'body',
+      template: path.resolve(__dirname, 'src/html/error/4xx/404.signal.html'), //指定模板文件
+      filename: '404.html',
+      chunks: ['common', 'signal'], // 此signal要设置common
+      minify: html_minify,
+      publicPath: './'
+    }),
+    new MiniCssExtractPlugin({
+      filename: 'style/[name].[hash].bundle.css',
+      chunkFilename: 'css/[id].bundle.css'
+    })
+  ],
+
+  devServer: {
+    static: {
+      directory: path.join(__dirname, dist_name)
+    },
+    compress: true,
+    port: 1001,
+    open: true,
+    hot: true
+  }
+}

+ 0 - 275
webpack_config_prod.js

@@ -1,275 +0,0 @@
-const path = require('path');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const MiniCssExtractPlugin = require("mini-css-extract-plugin");
-const filetool = require("./src/utils/file.js")
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-
-const mode = "production"
-const dist_name = "dist-prod"
-
-const html_minify = {
-  collapseWhitespace: true,
-  removeComments: true,
-  removeRedundantAttributes: true,
-  useShortDoctype: true,
-  removeEmptyAttributes: true,
-  removeStyleLinkTypeAttributes: true,
-  keepClosingSlash: true,
-  minifyJS: true,
-  minifyCSS: true,
-  minifyURLs: true,
-}
-
-const HTMMLPlugin = []
-
-const { localPathResult: AllHTMLLocalFile4xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/4xx'))
-AllHTMLLocalFile4xx.forEach((filePath) => {
-  if (!filePath.endsWith(".html")) {
-    return
-  }
-
-  if(filePath.includes("signal.html")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-      filename: path.join("error/4xx", filePath),
-      chunks: ["signal"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-  if(filePath.includes("400.html")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-      filename: path.join("error/4xx", filePath),
-      chunks: ["common", "err404"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-
-  HTMMLPlugin.push(new HtmlWebpackPlugin({
-    inject:'body',
-    template: path.resolve(__dirname, 'src/html/error/4xx', filePath),  //指定模板文件
-    filename: path.join("error/4xx", filePath),
-    chunks: ["common", "err4xx"],
-    publicPath: "../../"
-  }))
-})
-
-const { localPathResult: AllHTMLLocalFile5xx } = filetool.getAllFilePaths(path.resolve(__dirname, 'src/html/error/5xx'))
-AllHTMLLocalFile5xx.forEach((filePath) => {
-  if (!filePath.endsWith(".html")) {
-    return
-  }
-
-  if(filePath.includes("signal.html")){
-    HTMMLPlugin.push(new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/5xx', filePath),  //指定模板文件
-      filename: path.join("error/5xx", filePath),
-      chunks: ["signal"],
-      publicPath: "../../"
-    }))
-    return
-  }
-
-  HTMMLPlugin.push(new HtmlWebpackPlugin({
-    inject:'body',
-    template: path.resolve(__dirname, 'src/html/error/5xx', filePath),  //指定模板文件
-    filename: path.join("error/5xx", filePath),
-    chunks: ["common", "err5xx"],
-    publicPath: "../../"
-  }))
-})
-
-module.exports = {
-  mode: mode,
-
-  context: __dirname,
-
-  performance: {
-    hints: 'warning', // 或者 'error',取决于你希望如何处理超出限制的情况
-    maxAssetSize: 5000000, // 设置单个资源的最大尺寸,例如5MB
-    maxEntrypointSize: 10000000, // 设置入口起点的最大尺寸,例如10MB
-  },
-
-  entry: {
-    common: path.resolve(__dirname, 'src/common.js'),
-    index: path.resolve(__dirname, 'src/index.js'),
-    signal: path.resolve(__dirname, 'src/signal.js'),
-    new: path.resolve(__dirname, 'src/new.js'),
-    license: path.resolve(__dirname, 'src/license.js'),
-    mitorg: path.resolve(__dirname, 'src/mitorg.js'),
-    err4xx: path.resolve(__dirname, 'src/4xx.js'),
-    err404: path.resolve(__dirname, 'src/404.js'),
-    err5xx: path.resolve(__dirname, 'src/5xx.js'),
-  },
-
-  output: {
-    path: path.resolve(__dirname, dist_name),  //打包后的文件存放的地方
-    filename: 'js/[name].[fullhash].bundle.js',  //打包后输出文件的文件名
-    chunkFilename: '[name].bundle.js',
-    clean: true,
-    charset: true,
-    publicPath: "/"
-  },
-
-  resolve: {
-    alias: {
-      "@": path.join(__dirname, "src")
-    },
-  },
-
-  module: {
-    rules: [
-      {
-        test: /\.(css|scss|sass)$/,
-        use: [
-          MiniCssExtractPlugin.loader,
-          'css-loader',
-          'postcss-loader',
-          'sass-loader',
-        ],
-      },
-      {
-        test:/\.(png|jpg|jpeg|svg|gif)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'images', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test:/\.(mp4|m4v|avi|mov|qt|wmv|mkv|flv|webm|mpeg|mpg|3gp|3g2)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'videos', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test: /\.(woff|woff2|eot|ttf|otf)$/i,
-        use: [
-          {
-            loader: 'url-loader',
-            options: {
-              limit: 8192, // 8KB 以下的文件将被转换为 Data URL
-              fallback: 'file-loader',
-              outputPath: 'fonts', // 类似于 file-loader 的配置
-              name: '[name].[fullhash].[ext]',
-            },
-          },
-        ],
-      },
-      {
-        test: /\.html$/i,
-        loader: "html-loader",
-      },
-      {
-        test: require.resolve("jquery"),
-        loader: "expose-loader",
-        options: {
-          exposes: ["$", "jQuery"],
-        },
-      },
-    ],
-  },
-
-  plugins: [
-    new CopyWebpackPlugin({
-      patterns: [
-        { from: 'public', to: './' },
-        { from: './config.json', to: './SH_CONFIG.json' },
-        { from: './LICENSE', to: './' },
-        { from: './LICENSE_CN', to: './' },
-      ],
-    }),
-    ...HTMMLPlugin,
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html", "index.html"),  //指定模板文件
-      filename: "index.html",
-      chunks: ["common", "index"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","LICENSE_US.html"),  //指定模板文件
-      filename: "LICENSE_US.html",
-      chunks: ["common", "license"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/LICENSE_CN.html'),  //指定模板文件
-      filename: "LICENSE_CN.html",
-      chunks: ["common", "license"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","mitorg.html"),  //指定模板文件
-      filename: "mitorg.html",
-      chunks: ["common", "mitorg"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","index.new.signal.html"),  //指定模板文件
-      filename: "index.new.signal.html",
-      chunks: ["common", "new", "signal"],  // 此signal要设置common
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src', "html","index.new.html"),  //指定模板文件
-      filename: "index.new.html",
-      chunks: ["common", "new"],
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new HtmlWebpackPlugin({
-      inject:'body',
-      template: path.resolve(__dirname, 'src/html/error/4xx/404.signal.html'),  //指定模板文件
-      filename: "404.html",
-      chunks: ["common", "signal"],  // 此signal要设置common
-      minify: html_minify,
-      publicPath: "./",
-    }),
-    new MiniCssExtractPlugin({
-      filename: 'style/[name].[hash].bundle.css',
-      chunkFilename: 'css/[id].bundle.css',
-    }),
-  ],
-
-  devServer: {
-    static: {
-      directory: path.join(__dirname, dist_name),
-    },
-    compress: true,
-    port: 1001,
-    open: true,
-    hot: true,
-  },
-};