@umijs/bundler-webpack 4.0.0-beta.7 → 4.0.0-canary.202200505.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/client/client/client.js +65 -37
  2. package/client/constants.js +9 -0
  3. package/compiled/autoprefixer/browserslist/index.d.ts +13 -7
  4. package/compiled/autoprefixer/index.js +3 -3
  5. package/compiled/autoprefixer/postcss/lib/at-rule.d.ts +1 -1
  6. package/compiled/autoprefixer/postcss/lib/comment.d.ts +1 -1
  7. package/compiled/autoprefixer/postcss/lib/container.d.ts +2 -2
  8. package/compiled/autoprefixer/postcss/lib/css-syntax-error.d.ts +55 -8
  9. package/compiled/autoprefixer/postcss/lib/declaration.d.ts +2 -2
  10. package/compiled/autoprefixer/postcss/lib/input.d.ts +26 -6
  11. package/compiled/autoprefixer/postcss/lib/lazy-result.d.ts +11 -10
  12. package/compiled/autoprefixer/postcss/lib/no-work-result.d.ts +37 -0
  13. package/compiled/autoprefixer/postcss/lib/node.d.ts +38 -4
  14. package/compiled/autoprefixer/postcss/lib/postcss.d.ts +31 -30
  15. package/compiled/autoprefixer/postcss/lib/processor.d.ts +5 -4
  16. package/compiled/autoprefixer/postcss/lib/result.d.ts +3 -2
  17. package/compiled/autoprefixer/postcss/lib/rule.d.ts +1 -1
  18. package/compiled/autoprefixer/postcss/lib/warning.d.ts +37 -3
  19. package/compiled/autoprefixer/source-map-js/source-map.d.ts +99 -82
  20. package/compiled/babel-loader/index.js +2 -2
  21. package/compiled/copy-webpack-plugin/939.index.js +1171 -0
  22. package/compiled/copy-webpack-plugin/index.js +16 -10
  23. package/compiled/copy-webpack-plugin/package.json +1 -1
  24. package/compiled/css-minimizer-webpack-plugin/index.js +8 -2
  25. package/compiled/css-minimizer-webpack-plugin/minify.js +25 -11
  26. package/compiled/css-minimizer-webpack-plugin/package.json +1 -1
  27. package/compiled/css-minimizer-webpack-plugin/utils.js +225 -28
  28. package/compiled/cssnano/index.js +12 -11
  29. package/compiled/cssnano/package.json +1 -1
  30. package/compiled/express.d.ts +2 -0
  31. package/compiled/fork-ts-checker-webpack-plugin/LICENSE +21 -0
  32. package/compiled/fork-ts-checker-webpack-plugin/fsevents.node +0 -0
  33. package/compiled/fork-ts-checker-webpack-plugin/index.js +42 -0
  34. package/compiled/fork-ts-checker-webpack-plugin/package.json +1 -0
  35. package/compiled/http-proxy-middleware/dist/types.d.ts +5 -5
  36. package/compiled/http-proxy-middleware/http-proxy/index.d.ts +1 -1
  37. package/compiled/http-proxy-middleware/index.js +10 -10
  38. package/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +60 -8
  39. package/compiled/mini-css-extract-plugin/hmr/normalize-url.js +13 -1
  40. package/compiled/mini-css-extract-plugin/index.js +7970 -7445
  41. package/compiled/mini-css-extract-plugin/loader.js +179 -54
  42. package/compiled/mini-css-extract-plugin/package.json +1 -1
  43. package/compiled/mini-css-extract-plugin/utils.js +85 -24
  44. package/compiled/postcss-loader/index.js +1 -1
  45. package/compiled/react-refresh/LICENSE +21 -0
  46. package/compiled/react-refresh/index.js +9 -7
  47. package/compiled/react-refresh/package.json +1 -0
  48. package/compiled/sass-loader/index.js +1 -1
  49. package/compiled/schema-utils/ajv/dist/ajv.d.ts +16 -0
  50. package/compiled/schema-utils/ajv/dist/compile/codegen/code.d.ts +39 -0
  51. package/compiled/schema-utils/ajv/dist/compile/codegen/index.d.ts +79 -0
  52. package/compiled/schema-utils/ajv/dist/compile/codegen/scope.d.ts +79 -0
  53. package/compiled/schema-utils/ajv/dist/compile/errors.d.ts +13 -0
  54. package/compiled/schema-utils/ajv/dist/compile/index.d.ts +80 -0
  55. package/compiled/schema-utils/ajv/dist/compile/ref_error.d.ts +5 -0
  56. package/compiled/schema-utils/ajv/dist/compile/resolve.d.ts +12 -0
  57. package/compiled/schema-utils/ajv/dist/compile/rules.d.ts +28 -0
  58. package/compiled/schema-utils/ajv/dist/compile/util.d.ts +40 -0
  59. package/compiled/schema-utils/ajv/dist/compile/validate/index.d.ts +42 -0
  60. package/compiled/schema-utils/ajv/dist/compile/validate/subschema.d.ts +47 -0
  61. package/compiled/schema-utils/ajv/dist/core.d.ts +171 -0
  62. package/compiled/schema-utils/ajv/dist/runtime/validation_error.d.ts +7 -0
  63. package/compiled/schema-utils/ajv/dist/types/index.d.ts +177 -0
  64. package/compiled/schema-utils/ajv/dist/types/json-schema.d.ts +124 -0
  65. package/compiled/schema-utils/ajv/dist/types/jtd-schema.d.ts +168 -0
  66. package/compiled/schema-utils/declarations/validate.d.ts +4 -4
  67. package/compiled/schema-utils/index.js +8 -2
  68. package/compiled/schema-utils/uri-js/dist/es5/uri.all.d.ts +59 -0
  69. package/compiled/style-loader/index.js +1 -1
  70. package/compiled/terser/index.js +1 -1
  71. package/compiled/terser-webpack-plugin/index.js +393 -517
  72. package/compiled/terser-webpack-plugin/jest-worker/build/types.d.ts +1 -0
  73. package/compiled/terser-webpack-plugin/minify.js +10 -3
  74. package/compiled/terser-webpack-plugin/package.json +1 -1
  75. package/compiled/terser-webpack-plugin/types/index.d.ts +183 -149
  76. package/compiled/terser-webpack-plugin/types/minify.d.ts +17 -0
  77. package/compiled/terser-webpack-plugin/types/utils.d.ts +10 -15
  78. package/compiled/terser-webpack-plugin/utils.js +118 -25
  79. package/compiled/webpack/BasicEffectRulePlugin.js +1 -0
  80. package/compiled/webpack/BasicMatcherRulePlugin.js +1 -0
  81. package/compiled/webpack/HotModuleReplacement.runtime.js +29 -14
  82. package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +4 -3
  83. package/compiled/webpack/ObjectMatcherRulePlugin.js +1 -0
  84. package/compiled/webpack/RuleSetCompiler.js +1 -0
  85. package/compiled/webpack/UseEffectRulePlugin.js +1 -0
  86. package/compiled/webpack/deepImports.json +6 -1
  87. package/compiled/webpack/index.js +13409 -5746
  88. package/compiled/webpack/types.d.ts +606 -171
  89. package/compiled/webpack-dev-middleware/index.js +11 -5
  90. package/compiled/webpack-dev-middleware/package.json +1 -1
  91. package/compiled/{tapable → webpack-manifest-plugin}/LICENSE +2 -2
  92. package/compiled/webpack-manifest-plugin/index.js +1 -0
  93. package/compiled/webpack-manifest-plugin/package.json +1 -0
  94. package/compiled/webpack-sources/index.js +1 -1
  95. package/compiled/ws/index.d.ts +1 -2
  96. package/compiled/ws/index.js +1 -1
  97. package/dist/build.d.ts +6 -3
  98. package/dist/build.js +48 -56
  99. package/dist/cli.js +10 -22
  100. package/dist/client/client.js +57 -51
  101. package/dist/config/_sampleFeature.js +6 -17
  102. package/dist/config/assetRules.js +44 -51
  103. package/dist/config/bundleAnalyzerPlugin.js +12 -23
  104. package/dist/config/compressPlugin.js +70 -64
  105. package/dist/config/config.d.ts +9 -2
  106. package/dist/config/config.js +184 -144
  107. package/dist/config/copyPlugin.js +29 -40
  108. package/dist/config/cssRules.js +93 -83
  109. package/dist/config/definePlugin.js +11 -19
  110. package/dist/config/detectDeadCode.d.ts +12 -0
  111. package/dist/config/detectDeadCode.js +120 -0
  112. package/dist/config/detectDeadCodePlugin.d.ts +9 -0
  113. package/dist/config/detectDeadCodePlugin.js +70 -0
  114. package/dist/config/fastRefreshPlugin.js +11 -22
  115. package/dist/config/forkTSCheckerPlugin.d.ts +11 -0
  116. package/dist/config/forkTSCheckerPlugin.js +23 -0
  117. package/dist/config/harmonyLinkingErrorPlugin.d.ts +6 -0
  118. package/dist/config/harmonyLinkingErrorPlugin.js +31 -0
  119. package/dist/config/ignorePlugin.js +10 -21
  120. package/dist/config/javaScriptRules.d.ts +2 -0
  121. package/dist/config/javaScriptRules.js +153 -131
  122. package/dist/config/manifestPlugin.d.ts +11 -0
  123. package/dist/config/manifestPlugin.js +17 -0
  124. package/dist/config/miniCSSExtractPlugin.d.ts +1 -0
  125. package/dist/config/miniCSSExtractPlugin.js +12 -24
  126. package/dist/config/nodePolyfill.js +14 -20
  127. package/dist/config/nodePrefixPlugin.d.ts +11 -0
  128. package/dist/config/nodePrefixPlugin.js +14 -0
  129. package/dist/config/progressPlugin.js +7 -18
  130. package/dist/config/purgecssWebpackPlugin.js +15 -26
  131. package/dist/config/speedMeasureWebpackPlugin.js +12 -23
  132. package/dist/config/svgRules.d.ts +1 -0
  133. package/dist/config/svgRules.js +45 -48
  134. package/dist/constants.d.ts +4 -0
  135. package/dist/constants.js +10 -1
  136. package/dist/dev.d.ts +8 -2
  137. package/dist/dev.js +117 -66
  138. package/dist/index.d.ts +4 -1
  139. package/dist/index.js +5 -1
  140. package/dist/loader/svgr.d.ts +4 -0
  141. package/dist/loader/svgr.js +58 -0
  142. package/dist/loader/swc.d.ts +4 -0
  143. package/dist/loader/swc.js +74 -0
  144. package/dist/plugins/ESBuildCSSMinifyPlugin.js +23 -36
  145. package/dist/plugins/ParcelCSSMinifyPlugin.d.ts +10 -0
  146. package/dist/plugins/ParcelCSSMinifyPlugin.js +73 -0
  147. package/dist/plugins/ProgressPlugin.js +2 -2
  148. package/dist/plugins/RuntimePublicPathPlugin.d.ts +4 -0
  149. package/dist/plugins/RuntimePublicPathPlugin.js +20 -0
  150. package/dist/requireHook.js +1 -1
  151. package/dist/schema.js +23 -11
  152. package/dist/server/server.d.ts +2 -1
  153. package/dist/server/server.js +165 -130
  154. package/dist/server/ws.d.ts +6 -3
  155. package/dist/server/ws.js +1 -1
  156. package/dist/swcPlugins/autoCSSModules.d.ts +7 -2
  157. package/dist/swcPlugins/autoCSSModules.js +16 -17
  158. package/dist/swcPlugins/changeImportFromString.d.ts +2 -0
  159. package/dist/swcPlugins/changeImportFromString.js +10 -0
  160. package/dist/swcPlugins/lockCoreJS.d.ts +6 -0
  161. package/dist/swcPlugins/lockCoreJS.js +24 -0
  162. package/dist/types.d.ts +19 -0
  163. package/dist/types.js +1 -0
  164. package/dist/utils/depMatch.js +1 -1
  165. package/dist/utils/getEsBuildTarget.d.ts +5 -0
  166. package/dist/utils/getEsBuildTarget.js +12 -0
  167. package/package.json +68 -67
  168. package/compiled/@svgr/webpack/.svgo.yml +0 -75
  169. package/compiled/@svgr/webpack/LICENSE +0 -7
  170. package/compiled/@svgr/webpack/index.js +0 -343
  171. package/compiled/@svgr/webpack/package.json +0 -1
  172. package/compiled/css-loader/LICENSE +0 -20
  173. package/compiled/css-loader/api.js +0 -102
  174. package/compiled/css-loader/getUrl.js +0 -29
  175. package/compiled/css-loader/index.js +0 -2
  176. package/compiled/css-loader/noSourceMaps.js +0 -5
  177. package/compiled/css-loader/package.json +0 -1
  178. package/compiled/css-loader/sourceMaps.js +0 -22
  179. package/compiled/express/LICENSE +0 -24
  180. package/compiled/express/body-parser/index.d.ts +0 -104
  181. package/compiled/express/connect/index.d.ts +0 -93
  182. package/compiled/express/express-serve-static-core/index.d.ts +0 -1252
  183. package/compiled/express/index.d.ts +0 -133
  184. package/compiled/express/index.js +0 -338
  185. package/compiled/express/mime/index.d.ts +0 -35
  186. package/compiled/express/package.json +0 -1
  187. package/compiled/express/qs/index.d.ts +0 -62
  188. package/compiled/express/range-parser/index.d.ts +0 -35
  189. package/compiled/express/serve-static/index.d.ts +0 -108
  190. package/compiled/less/index.js +0 -31
  191. package/compiled/less/package.json +0 -1
  192. package/compiled/swc-loader/LICENSE +0 -25
  193. package/compiled/swc-loader/index.js +0 -1
  194. package/compiled/swc-loader/package.json +0 -1
  195. package/compiled/tapable/index.js +0 -1
  196. package/compiled/tapable/package.json +0 -1
  197. package/compiled/tapable/tapable.d.ts +0 -116
@@ -0,0 +1,6 @@
1
+ import type { ImportDeclaration } from '@swc/core';
2
+ import Visitor from '@swc/core/Visitor';
3
+ declare class LockCoreJS extends Visitor {
4
+ visitImportDeclaration(expression: ImportDeclaration): ImportDeclaration;
5
+ }
6
+ export default LockCoreJS;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const Visitor_1 = __importDefault(require("@swc/core/Visitor"));
7
+ const utils_1 = require("@umijs/utils");
8
+ const path_1 = require("path");
9
+ const changeImportFromString_1 = require("./changeImportFromString");
10
+ function addLastSlash(path) {
11
+ return path.endsWith('/') ? path : `${path}/`;
12
+ }
13
+ class LockCoreJS extends Visitor_1.default {
14
+ visitImportDeclaration(expression) {
15
+ const { source } = expression;
16
+ let { value, type } = source;
17
+ if (type === 'StringLiteral' && value.startsWith('core-js/')) {
18
+ const newValue = value.replace(/^core-js\//, addLastSlash((0, utils_1.winPath)((0, path_1.dirname)(require.resolve('core-js/package.json')))));
19
+ (0, changeImportFromString_1.changeImportFromString)(expression, newValue);
20
+ }
21
+ return expression;
22
+ }
23
+ }
24
+ exports.default = LockCoreJS;
package/dist/types.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { Config as SwcConfig } from '@swc/core';
2
+ import type { HttpsServerOptions } from '@umijs/bundler-utils';
1
3
  import type { Options as ProxyOptions } from '../compiled/http-proxy-middleware';
2
4
  import { Configuration } from '../compiled/webpack';
3
5
  import Config from '../compiled/webpack-5-chain';
@@ -21,6 +23,7 @@ export declare enum JSMinifier {
21
23
  export declare enum CSSMinifier {
22
24
  esbuild = "esbuild",
23
25
  cssnano = "cssnano",
26
+ parcelCSS = "parcelCSS",
24
27
  none = "none"
25
28
  }
26
29
  export interface ICopy {
@@ -31,9 +34,18 @@ declare type WebpackConfig = Required<Configuration>;
31
34
  declare type IBabelPlugin = Function | string | [string, {
32
35
  [key: string]: any;
33
36
  }];
37
+ export interface DeadCodeParams {
38
+ patterns?: string[];
39
+ exclude?: string[];
40
+ failOnHint?: boolean;
41
+ detectUnusedFiles?: boolean;
42
+ detectUnusedExport?: boolean;
43
+ context?: string;
44
+ }
34
45
  export interface IConfig {
35
46
  alias?: Record<string, string>;
36
47
  autoCSSModules?: boolean;
48
+ base?: string;
37
49
  chainWebpack?: Function;
38
50
  copy?: ICopy[] | string[];
39
51
  cssLoader?: {
@@ -51,12 +63,15 @@ export interface IConfig {
51
63
  };
52
64
  depTranspiler?: Transpiler;
53
65
  devtool?: Config.DevTool;
66
+ deadCode?: DeadCodeParams;
67
+ https?: HttpsServerOptions;
54
68
  externals?: WebpackConfig['externals'];
55
69
  esm?: {
56
70
  [key: string]: any;
57
71
  };
58
72
  extraBabelPlugins?: IBabelPlugin[];
59
73
  extraBabelPresets?: IBabelPlugin[];
74
+ extraBabelIncludes?: string[];
60
75
  extraPostCSSPlugins?: any[];
61
76
  hash?: boolean;
62
77
  ignoreMomentLocale?: boolean;
@@ -97,4 +112,8 @@ export interface IConfig {
97
112
  writeToDisk?: boolean;
98
113
  [key: string]: any;
99
114
  }
115
+ export interface SwcOptions extends SwcConfig {
116
+ sync?: boolean;
117
+ parseMap?: boolean;
118
+ }
100
119
  export {};
package/dist/types.js CHANGED
@@ -25,5 +25,6 @@ var CSSMinifier;
25
25
  (function (CSSMinifier) {
26
26
  CSSMinifier["esbuild"] = "esbuild";
27
27
  CSSMinifier["cssnano"] = "cssnano";
28
+ CSSMinifier["parcelCSS"] = "parcelCSS";
28
29
  CSSMinifier["none"] = "none";
29
30
  })(CSSMinifier = exports.CSSMinifier || (exports.CSSMinifier = {}));
@@ -15,7 +15,7 @@ function isMatch(opts) {
15
15
  return !!cache.get(dir);
16
16
  }
17
17
  else {
18
- const pkgPath = utils_1.pkgUp.sync({ cwd: opts.path });
18
+ const pkgPath = utils_1.pkgUp.pkgUpSync({ cwd: opts.path });
19
19
  let ret;
20
20
  if (!pkgPath) {
21
21
  ret = false;
@@ -0,0 +1,5 @@
1
+ interface IOpts {
2
+ targets: Record<string, any>;
3
+ }
4
+ export declare function getEsBuildTarget({ targets }: IOpts): string[];
5
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getEsBuildTarget = void 0;
4
+ const constants_1 = require("../constants");
5
+ function getEsBuildTarget({ targets }) {
6
+ return Object.keys(targets)
7
+ .filter((key) => constants_1.DEFAULT_ESBUILD_TARGET_KEYS.includes(key))
8
+ .map((key) => {
9
+ return `${key}${targets[key] === true ? '0' : targets[key]}`;
10
+ });
11
+ }
12
+ exports.getEsBuildTarget = getEsBuildTarget;
package/package.json CHANGED
@@ -1,9 +1,19 @@
1
1
  {
2
2
  "name": "@umijs/bundler-webpack",
3
- "version": "4.0.0-beta.7",
3
+ "version": "4.0.0-canary.202200505.1",
4
4
  "description": "@umijs/bundler-webpack",
5
+ "homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-webpack#readme",
6
+ "bugs": "https://github.com/umijs/umi-next/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/umijs/umi-next"
10
+ },
11
+ "license": "MIT",
5
12
  "main": "dist/index.js",
6
13
  "types": "dist/index.d.ts",
14
+ "bin": {
15
+ "bundler-webpack": "bin/bundler-webpack.js"
16
+ },
7
17
  "files": [
8
18
  "bin",
9
19
  "client",
@@ -13,82 +23,73 @@
13
23
  "scripts": {
14
24
  "build": "pnpm tsc",
15
25
  "build:client": "pnpm tsc --project ./tsconfig.client.json",
16
- "build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
26
+ "build:deps": "umi-scripts bundleDeps",
17
27
  "dev": "pnpm build -- --watch",
18
- "generate:webpackPackages": "zx ./scripts/generateWebpackPackages.mjs"
19
- },
20
- "repository": {
21
- "type": "git",
22
- "url": "https://github.com/umijs/umi-next"
23
- },
24
- "authors": [
25
- "chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
26
- ],
27
- "license": "MIT",
28
- "bugs": "https://github.com/umijs/umi-next/issues",
29
- "homepage": "https://github.com/umijs/umi-next/tree/master/packages/bundler-webpack#readme",
30
- "publishConfig": {
31
- "access": "public"
32
- },
33
- "bin": {
34
- "bundler-webpack": "bin/bundler-webpack.js"
28
+ "generate:webpackPackages": "zx ./scripts/generateWebpackPackages.mjs",
29
+ "test": "umi-scripts jest-turbo"
35
30
  },
36
31
  "dependencies": {
37
- "@pmmmwh/react-refresh-webpack-plugin": "0.5.1",
38
- "@swc/core": "1.2.105",
39
- "@types/hapi__joi": "17.1.7",
40
- "@umijs/babel-preset-umi": "4.0.0-beta.7",
41
- "@umijs/mfsu": "4.0.0-beta.7",
42
- "@umijs/utils": "4.0.0-beta.7",
43
- "css-loader": "6.5.0",
32
+ "@parcel/css": "1.8.1",
33
+ "@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
34
+ "@svgr/core": "6.2.1",
35
+ "@svgr/plugin-jsx": "^6.2.1",
36
+ "@svgr/plugin-svgo": "^6.2.0",
37
+ "@types/hapi__joi": "17.1.8",
38
+ "@umijs/babel-preset-umi": "4.0.0-canary.202200505.1",
39
+ "@umijs/bundler-utils": "4.0.0-canary.202200505.1",
40
+ "@umijs/mfsu": "4.0.0-canary.202200505.1",
41
+ "@umijs/utils": "4.0.0-canary.202200505.1",
42
+ "css-loader": "6.7.1",
44
43
  "es5-imcompatible-versions": "^0.1.73",
45
- "jest-worker": "27.3.1",
44
+ "jest-worker": "27.5.1",
46
45
  "node-libs-browser": "2.2.1",
47
- "postcss": "^8.3.11",
48
- "postcss-preset-env": "6.7.0",
46
+ "postcss": "^8.4.12",
47
+ "postcss-preset-env": "7.4.3",
49
48
  "react-error-overlay": "6.0.9"
50
49
  },
51
50
  "devDependencies": {
52
- "@svgr/webpack": "5.5.0",
53
- "@types/express": "4.17.13",
51
+ "@swc/core": "1.2.165",
54
52
  "@types/webpack-sources": "3.2.0",
55
- "@types/ws": "8.2.0",
56
- "autoprefixer": "10.3.7",
57
- "babel-loader": "8.2.2",
53
+ "@types/ws": "8.5.3",
54
+ "autoprefixer": "10.4.4",
55
+ "babel-loader": "8.2.4",
58
56
  "compression": "1.7.4",
59
57
  "connect-history-api-fallback": "1.6.0",
60
- "copy-webpack-plugin": "9.0.1",
61
- "css-minimizer-webpack-plugin": "3.1.1",
62
- "cssnano": "5.0.8",
63
- "express": "4.17.1",
64
- "http-proxy-middleware": "2.0.1",
65
- "less": "4.1.2",
58
+ "copy-webpack-plugin": "10.2.4",
59
+ "css-minimizer-webpack-plugin": "3.4.1",
60
+ "cssnano": "5.1.7",
61
+ "fork-ts-checker-webpack-plugin": "7.2.4",
62
+ "http-proxy-middleware": "2.0.4",
66
63
  "less-loader": "10.2.0",
67
- "mini-css-extract-plugin": "2.4.2",
64
+ "mini-css-extract-plugin": "2.6.0",
68
65
  "postcss-flexbugs-fixes": "5.0.2",
69
- "postcss-loader": "6.2.0",
70
- "purgecss-webpack-plugin": "4.0.3",
71
- "react-refresh": "0.10.0",
72
- "sass-loader": "12.2.0",
73
- "schema-utils": "3.1.1",
66
+ "postcss-loader": "6.2.1",
67
+ "purgecss-webpack-plugin": "4.1.3",
68
+ "react-refresh": "0.12.0",
69
+ "sass-loader": "12.6.0",
70
+ "schema-utils": "4.0.0",
74
71
  "speed-measure-webpack-plugin": "1.5.0",
75
- "style-loader": "3.3.0",
72
+ "style-loader": "3.3.1",
76
73
  "svgo-loader": "3.0.0",
77
- "swc-loader": "0.1.15",
78
- "tapable": "2.2.1",
79
- "terser": "5.9.0",
80
- "terser-webpack-plugin": "5.2.4",
74
+ "terser": "5.12.1",
75
+ "terser-webpack-plugin": "5.3.1",
81
76
  "url-loader": "4.1.1",
82
- "webpack": "5.61.0",
77
+ "webpack": "5.72.0",
83
78
  "webpack-5-chain": "8.0.0",
84
79
  "webpack-bundle-analyzer": "4.5.0",
85
- "webpack-dev-middleware": "5.2.1",
86
- "webpack-sources": "3.2.1",
87
- "ws": "8.2.3"
80
+ "webpack-dev-middleware": "5.3.1",
81
+ "webpack-manifest-plugin": "5.0.0",
82
+ "webpack-sources": "3.2.3",
83
+ "ws": "8.5.0"
84
+ },
85
+ "publishConfig": {
86
+ "access": "public"
88
87
  },
88
+ "authors": [
89
+ "chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
90
+ ],
89
91
  "compiledConfig": {
90
92
  "deps": [
91
- "@svgr/webpack",
92
93
  "autoprefixer",
93
94
  "babel-loader",
94
95
  "copy-webpack-plugin",
@@ -97,9 +98,8 @@
97
98
  "cssnano",
98
99
  "compression",
99
100
  "connect-history-api-fallback",
100
- "express",
101
+ "fork-ts-checker-webpack-plugin",
101
102
  "http-proxy-middleware",
102
- "less",
103
103
  "less-loader",
104
104
  "mini-css-extract-plugin",
105
105
  "postcss-flexbugs-fixes",
@@ -108,16 +108,15 @@
108
108
  "sass-loader",
109
109
  "schema-utils",
110
110
  "style-loader",
111
- "swc-loader",
112
111
  "speed-measure-webpack-plugin",
113
112
  "svgo-loader",
114
- "tapable",
115
113
  "terser",
116
114
  "terser-webpack-plugin",
117
115
  "url-loader",
118
116
  "webpack-5-chain",
119
117
  "webpack-bundle-analyzer",
120
118
  "webpack-dev-middleware",
119
+ "webpack-manifest-plugin",
121
120
  "webpack-sources",
122
121
  "ws",
123
122
  "./bundles/webpack/bundle",
@@ -128,17 +127,19 @@
128
127
  "@babel/core": "@umijs/bundler-utils/compiled/babel/core",
129
128
  "es-module-lexer": "@umijs/bundler-utils/compiled/es-module-lexer",
130
129
  "esbuild": "@umijs/bundler-utils/compiled/esbuild",
131
- "express": "$$LOCAL",
130
+ "express": "@umijs/bundler-utils/compiled/express",
132
131
  "jest-worker": "jest-worker",
133
- "less": "$$LOCAL",
132
+ "less": "@umijs/bundler-utils/compiled/less",
134
133
  "cssnano": "$$LOCAL",
135
134
  "postcss": "postcss",
136
- "tapable": "$$LOCAL",
135
+ "tapable": "@umijs/bundler-utils/compiled/tapable",
137
136
  "terser": "$$LOCAL",
138
137
  "terser-webpack-plugin": "$$LOCAL",
138
+ "typescript": "typescript",
139
139
  "uglify-js": "uglify-js",
140
140
  "url-loader": "$$LOCAL",
141
141
  "webpack": "$$LOCAL",
142
+ "webpack/lib/NormalModule": "../webpack/NormalModule",
142
143
  "webpack-5-chain": "$$LOCAL",
143
144
  "webpack-sources": "$$LOCAL",
144
145
  "ws": "$$LOCAL"
@@ -159,7 +160,6 @@
159
160
  "webpack"
160
161
  ],
161
162
  "excludeDtsDeps": [
162
- "@svgr/webpack",
163
163
  "babel-loader",
164
164
  "copy-webpack-plugin",
165
165
  "css-loader",
@@ -167,20 +167,21 @@
167
167
  "cssnano",
168
168
  "compression",
169
169
  "connect-history-api-fallback",
170
- "less",
170
+ "fork-ts-checker-webpack-plugin",
171
171
  "less-loader",
172
172
  "mini-css-extract-plugin",
173
173
  "postcss-flexbugs-fixes",
174
174
  "postcss-loader",
175
175
  "purgecss-webpack-plugin",
176
+ "react-refresh",
176
177
  "sass-loader",
177
178
  "speed-measure-webpack-plugin",
178
179
  "style-loader",
179
- "swc-loader",
180
180
  "svgo-loader",
181
181
  "url-loader",
182
182
  "webpack-bundle-analyzer",
183
- "webpack-dev-middleware"
183
+ "webpack-dev-middleware",
184
+ "webpack-manifest-plugin"
184
185
  ]
185
186
  }
186
187
  }
@@ -1,75 +0,0 @@
1
- # replace default config
2
-
3
- # multipass: true
4
- # full: true
5
-
6
- plugins:
7
-
8
- # - name
9
- #
10
- # or:
11
- # - name: false
12
- # - name: true
13
- #
14
- # or:
15
- # - name:
16
- # param1: 1
17
- # param2: 2
18
-
19
- - removeDoctype
20
- - removeXMLProcInst
21
- - removeComments
22
- - removeMetadata
23
- - removeXMLNS
24
- - removeEditorsNSData
25
- - cleanupAttrs
26
- - inlineStyles
27
- - minifyStyles
28
- - convertStyleToAttrs
29
- - cleanupIDs
30
- - prefixIds
31
- - removeRasterImages
32
- - removeUselessDefs
33
- - cleanupNumericValues
34
- - cleanupListOfValues
35
- - convertColors
36
- - removeUnknownsAndDefaults
37
- - removeNonInheritableGroupAttrs
38
- - removeUselessStrokeAndFill
39
- - removeViewBox
40
- - cleanupEnableBackground
41
- - removeHiddenElems
42
- - removeEmptyText
43
- - convertShapeToPath
44
- - convertEllipseToCircle
45
- - moveElemsAttrsToGroup
46
- - moveGroupAttrsToElems
47
- - collapseGroups
48
- - convertPathData
49
- - convertTransform
50
- - removeEmptyAttrs
51
- - removeEmptyContainers
52
- - mergePaths
53
- - removeUnusedNS
54
- - sortAttrs
55
- - sortDefsChildren
56
- - removeTitle
57
- - removeDesc
58
- - removeDimensions
59
- - removeAttrs
60
- - removeAttributesBySelector
61
- - removeElementsByAttr
62
- - addClassesToSVGElement
63
- - removeStyleElement
64
- - removeScriptElement
65
- - addAttributesToSVGElement
66
- - removeOffCanvasPaths
67
- - reusePaths
68
-
69
- # configure the indent (default 4 spaces) used by `--pretty` here:
70
- #
71
- # @see https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
72
- #
73
- # js2svg:
74
- # pretty: true
75
- # indent: ' '
@@ -1,7 +0,0 @@
1
- Copyright 2017 Smooth Code
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.