@umijs/bundler-webpack 4.0.0-beta.7 → 4.0.0-canary.20220316.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 (151) hide show
  1. package/compiled/autoprefixer/browserslist/index.d.ts +11 -7
  2. package/compiled/autoprefixer/index.js +3 -3
  3. package/compiled/autoprefixer/postcss/lib/at-rule.d.ts +1 -1
  4. package/compiled/autoprefixer/postcss/lib/comment.d.ts +1 -1
  5. package/compiled/autoprefixer/postcss/lib/container.d.ts +2 -2
  6. package/compiled/autoprefixer/postcss/lib/css-syntax-error.d.ts +55 -8
  7. package/compiled/autoprefixer/postcss/lib/declaration.d.ts +1 -1
  8. package/compiled/autoprefixer/postcss/lib/input.d.ts +26 -6
  9. package/compiled/autoprefixer/postcss/lib/lazy-result.d.ts +11 -10
  10. package/compiled/autoprefixer/postcss/lib/no-work-result.d.ts +37 -0
  11. package/compiled/autoprefixer/postcss/lib/node.d.ts +36 -2
  12. package/compiled/autoprefixer/postcss/lib/postcss.d.ts +31 -30
  13. package/compiled/autoprefixer/postcss/lib/processor.d.ts +5 -4
  14. package/compiled/autoprefixer/postcss/lib/result.d.ts +3 -2
  15. package/compiled/autoprefixer/postcss/lib/rule.d.ts +1 -1
  16. package/compiled/autoprefixer/postcss/lib/warning.d.ts +37 -3
  17. package/compiled/autoprefixer/source-map-js/source-map.d.ts +99 -82
  18. package/compiled/babel-loader/index.js +2 -2
  19. package/compiled/copy-webpack-plugin/576.index.js +1171 -0
  20. package/compiled/copy-webpack-plugin/index.js +16 -10
  21. package/compiled/copy-webpack-plugin/package.json +1 -1
  22. package/compiled/css-minimizer-webpack-plugin/index.js +8 -2
  23. package/compiled/css-minimizer-webpack-plugin/minify.js +25 -11
  24. package/compiled/css-minimizer-webpack-plugin/package.json +1 -1
  25. package/compiled/css-minimizer-webpack-plugin/utils.js +225 -28
  26. package/compiled/cssnano/index.js +12 -11
  27. package/compiled/cssnano/package.json +1 -1
  28. package/compiled/express/index.js +57 -74
  29. package/compiled/fork-ts-checker-webpack-plugin/LICENSE +21 -0
  30. package/compiled/fork-ts-checker-webpack-plugin/fsevents.node +0 -0
  31. package/compiled/fork-ts-checker-webpack-plugin/index.js +48 -0
  32. package/compiled/fork-ts-checker-webpack-plugin/package.json +1 -0
  33. package/compiled/http-proxy-middleware/dist/types.d.ts +5 -5
  34. package/compiled/http-proxy-middleware/http-proxy/index.d.ts +1 -1
  35. package/compiled/http-proxy-middleware/index.js +10 -10
  36. package/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +60 -8
  37. package/compiled/mini-css-extract-plugin/hmr/normalize-url.js +13 -1
  38. package/compiled/mini-css-extract-plugin/index.js +7970 -7445
  39. package/compiled/mini-css-extract-plugin/loader.js +179 -54
  40. package/compiled/mini-css-extract-plugin/package.json +1 -1
  41. package/compiled/mini-css-extract-plugin/utils.js +85 -24
  42. package/compiled/postcss-loader/index.js +1 -1
  43. package/compiled/react-refresh/index.js +3 -3
  44. package/compiled/sass-loader/index.js +1 -1
  45. package/compiled/schema-utils/ajv/dist/ajv.d.ts +16 -0
  46. package/compiled/schema-utils/ajv/dist/compile/codegen/code.d.ts +39 -0
  47. package/compiled/schema-utils/ajv/dist/compile/codegen/index.d.ts +79 -0
  48. package/compiled/schema-utils/ajv/dist/compile/codegen/scope.d.ts +79 -0
  49. package/compiled/schema-utils/ajv/dist/compile/errors.d.ts +13 -0
  50. package/compiled/schema-utils/ajv/dist/compile/index.d.ts +80 -0
  51. package/compiled/schema-utils/ajv/dist/compile/ref_error.d.ts +5 -0
  52. package/compiled/schema-utils/ajv/dist/compile/resolve.d.ts +12 -0
  53. package/compiled/schema-utils/ajv/dist/compile/rules.d.ts +28 -0
  54. package/compiled/schema-utils/ajv/dist/compile/util.d.ts +40 -0
  55. package/compiled/schema-utils/ajv/dist/compile/validate/index.d.ts +42 -0
  56. package/compiled/schema-utils/ajv/dist/compile/validate/subschema.d.ts +47 -0
  57. package/compiled/schema-utils/ajv/dist/core.d.ts +171 -0
  58. package/compiled/schema-utils/ajv/dist/runtime/validation_error.d.ts +7 -0
  59. package/compiled/schema-utils/ajv/dist/types/index.d.ts +177 -0
  60. package/compiled/schema-utils/ajv/dist/types/json-schema.d.ts +124 -0
  61. package/compiled/schema-utils/ajv/dist/types/jtd-schema.d.ts +168 -0
  62. package/compiled/schema-utils/declarations/validate.d.ts +4 -4
  63. package/compiled/schema-utils/index.js +8 -2
  64. package/compiled/schema-utils/uri-js/dist/es5/uri.all.d.ts +59 -0
  65. package/compiled/style-loader/index.js +1 -1
  66. package/compiled/terser/index.js +1 -1
  67. package/compiled/terser-webpack-plugin/index.js +393 -517
  68. package/compiled/terser-webpack-plugin/jest-worker/build/types.d.ts +1 -0
  69. package/compiled/terser-webpack-plugin/minify.js +10 -3
  70. package/compiled/terser-webpack-plugin/package.json +1 -1
  71. package/compiled/terser-webpack-plugin/types/index.d.ts +183 -149
  72. package/compiled/terser-webpack-plugin/types/minify.d.ts +17 -0
  73. package/compiled/terser-webpack-plugin/types/utils.d.ts +10 -15
  74. package/compiled/terser-webpack-plugin/utils.js +118 -25
  75. package/compiled/webpack/index.js +11665 -5565
  76. package/compiled/webpack-dev-middleware/index.js +11 -5
  77. package/compiled/webpack-dev-middleware/package.json +1 -1
  78. package/compiled/webpack-manifest-plugin/LICENSE +21 -0
  79. package/compiled/webpack-manifest-plugin/index.js +1 -0
  80. package/compiled/webpack-manifest-plugin/package.json +1 -0
  81. package/compiled/webpack-sources/index.js +1 -1
  82. package/compiled/ws/index.d.ts +1 -2
  83. package/compiled/ws/index.js +1 -1
  84. package/dist/build.d.ts +5 -3
  85. package/dist/build.js +2 -1
  86. package/dist/cli.js +4 -7
  87. package/dist/client/client.js +5 -1
  88. package/dist/config/assetRules.js +6 -2
  89. package/dist/config/compressPlugin.js +6 -0
  90. package/dist/config/config.d.ts +7 -2
  91. package/dist/config/config.js +50 -8
  92. package/dist/config/cssRules.js +1 -1
  93. package/dist/config/detectDeadCode.d.ts +12 -0
  94. package/dist/config/detectDeadCode.js +120 -0
  95. package/dist/config/detectDeadCodePlugin.d.ts +9 -0
  96. package/dist/config/detectDeadCodePlugin.js +75 -0
  97. package/dist/config/forkTSCheckerPlugin.d.ts +11 -0
  98. package/dist/config/forkTSCheckerPlugin.js +34 -0
  99. package/dist/config/harmonyLinkingErrorPlugin.d.ts +6 -0
  100. package/dist/config/harmonyLinkingErrorPlugin.js +42 -0
  101. package/dist/config/javaScriptRules.d.ts +1 -0
  102. package/dist/config/javaScriptRules.js +34 -26
  103. package/dist/config/manifestPlugin.d.ts +11 -0
  104. package/dist/config/manifestPlugin.js +25 -0
  105. package/dist/config/miniCSSExtractPlugin.d.ts +1 -0
  106. package/dist/config/miniCSSExtractPlugin.js +2 -3
  107. package/dist/config/svgRules.d.ts +1 -0
  108. package/dist/config/svgRules.js +12 -11
  109. package/dist/constants.d.ts +3 -0
  110. package/dist/constants.js +4 -1
  111. package/dist/dev.d.ts +4 -2
  112. package/dist/dev.js +41 -11
  113. package/dist/index.d.ts +3 -0
  114. package/dist/index.js +5 -1
  115. package/dist/loader/svgr.d.ts +4 -0
  116. package/dist/loader/svgr.js +67 -0
  117. package/dist/loader/swc.d.ts +4 -0
  118. package/dist/loader/swc.js +79 -0
  119. package/dist/plugins/ESBuildCSSMinifyPlugin.js +1 -3
  120. package/dist/plugins/ParcelCSSMinifyPlugin.d.ts +10 -0
  121. package/dist/plugins/ParcelCSSMinifyPlugin.js +75 -0
  122. package/dist/plugins/ProgressPlugin.js +2 -2
  123. package/dist/plugins/RuntimePublicPathPlugin.d.ts +4 -0
  124. package/dist/plugins/RuntimePublicPathPlugin.js +20 -0
  125. package/dist/requireHook.js +1 -1
  126. package/dist/schema.js +17 -9
  127. package/dist/server/server.js +24 -2
  128. package/dist/server/ws.d.ts +1 -1
  129. package/dist/server/ws.js +1 -1
  130. package/dist/swcPlugins/autoCSSModules.d.ts +7 -2
  131. package/dist/swcPlugins/autoCSSModules.js +13 -16
  132. package/dist/swcPlugins/lockCoreJS.d.ts +6 -0
  133. package/dist/swcPlugins/lockCoreJS.js +23 -0
  134. package/dist/types.d.ts +16 -0
  135. package/dist/types.js +1 -0
  136. package/dist/utils/depMatch.js +1 -1
  137. package/package.json +63 -56
  138. package/compiled/@svgr/webpack/.svgo.yml +0 -75
  139. package/compiled/@svgr/webpack/LICENSE +0 -7
  140. package/compiled/@svgr/webpack/index.js +0 -343
  141. package/compiled/@svgr/webpack/package.json +0 -1
  142. package/compiled/css-loader/LICENSE +0 -20
  143. package/compiled/css-loader/api.js +0 -102
  144. package/compiled/css-loader/getUrl.js +0 -29
  145. package/compiled/css-loader/index.js +0 -2
  146. package/compiled/css-loader/noSourceMaps.js +0 -5
  147. package/compiled/css-loader/package.json +0 -1
  148. package/compiled/css-loader/sourceMaps.js +0 -22
  149. package/compiled/swc-loader/LICENSE +0 -25
  150. package/compiled/swc-loader/index.js +0 -1
  151. package/compiled/swc-loader/package.json +0 -1
package/dist/server/ws.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createWebSocketServer = void 0;
7
7
  const utils_1 = require("@umijs/utils");
8
- const ws_1 = __importDefault(require("ws"));
8
+ const ws_1 = __importDefault(require("../../compiled/ws"));
9
9
  function createWebSocketServer(server) {
10
10
  const wss = new ws_1.default.Server({
11
11
  noServer: true,
@@ -1,8 +1,13 @@
1
- import { ImportDeclaration, TsType, VariableDeclaration } from '@swc/core';
1
+ import type { ImportDeclaration, ModuleItem, TsType } from '@swc/core';
2
2
  import Visitor from '@swc/core/Visitor';
3
3
  declare class AutoCSSModule extends Visitor {
4
4
  visitTsType(expression: TsType): TsType;
5
+ /**
6
+ * call path:
7
+ * visitProgram -> visitModule -> visitModuleItems -> visitModuleItem -> visitImportDeclaration
8
+ * @see https://github.com/swc-project/swc/blob/main/node-swc/src/Visitor.ts#L189
9
+ */
10
+ visitModuleItem(n: ModuleItem): ImportDeclaration | import("@swc/core").ExportDeclaration | import("@swc/core").ExportNamedDeclaration | import("@swc/core").ExportDefaultDeclaration | import("@swc/core").ExportDefaultExpression | import("@swc/core").ExportAllDeclaration | import("@swc/core").TsImportEqualsDeclaration | import("@swc/core").TsExportAssignment | import("@swc/core").TsNamespaceExportDeclaration | import("@swc/core").ExpressionStatement | import("@swc/core").BlockStatement | import("@swc/core").EmptyStatement | import("@swc/core").DebuggerStatement | import("@swc/core").WithStatement | import("@swc/core").ReturnStatement | import("@swc/core").LabeledStatement | import("@swc/core").BreakStatement | import("@swc/core").ContinueStatement | import("@swc/core").IfStatement | import("@swc/core").SwitchStatement | import("@swc/core").ThrowStatement | import("@swc/core").TryStatement | import("@swc/core").WhileStatement | import("@swc/core").DoWhileStatement | import("@swc/core").ForStatement | import("@swc/core").ForInStatement | import("@swc/core").ForOfStatement | import("@swc/core").ClassDeclaration | import("@swc/core").FunctionDeclaration | import("@swc/core").VariableDeclaration | import("@swc/core").TsInterfaceDeclaration | import("@swc/core").TsTypeAliasDeclaration | import("@swc/core").TsEnumDeclaration | import("@swc/core").TsModuleDeclaration;
5
11
  visitImportDeclaration(expression: ImportDeclaration): ImportDeclaration;
6
- visitVariableDeclaration(expression: VariableDeclaration): VariableDeclaration;
7
12
  }
8
13
  export default AutoCSSModule;
@@ -4,32 +4,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Visitor_1 = __importDefault(require("@swc/core/Visitor"));
7
- const path_1 = require("path");
8
- const CSS_EXT_NAMES = ['.css', '.less', '.sass', '.scss', '.stylus', '.styl'];
7
+ const utils_1 = require("@umijs/utils");
9
8
  class AutoCSSModule extends Visitor_1.default {
10
9
  visitTsType(expression) {
11
10
  return expression;
12
11
  }
12
+ /**
13
+ * call path:
14
+ * visitProgram -> visitModule -> visitModuleItems -> visitModuleItem -> visitImportDeclaration
15
+ * @see https://github.com/swc-project/swc/blob/main/node-swc/src/Visitor.ts#L189
16
+ */
17
+ visitModuleItem(n) {
18
+ if (n.type === 'ImportDeclaration') {
19
+ return this.visitImportDeclaration(n);
20
+ }
21
+ return n;
22
+ }
13
23
  visitImportDeclaration(expression) {
14
24
  const { specifiers, source } = expression;
15
25
  const { value } = source;
16
- if (specifiers.length && CSS_EXT_NAMES.includes((0, path_1.extname)(value))) {
26
+ if (specifiers.length && (0, utils_1.isStyleFile)({ filename: value })) {
17
27
  return Object.assign(Object.assign({}, expression), { source: Object.assign(Object.assign({}, source), { value: `${value}?modules` }) });
18
28
  }
19
29
  return expression;
20
30
  }
21
- visitVariableDeclaration(expression) {
22
- const { declarations } = expression;
23
- if (declarations.length &&
24
- declarations[0].init &&
25
- declarations[0].init.type === 'AwaitExpression' &&
26
- declarations[0].init.argument.type === 'CallExpression' &&
27
- declarations[0].init.argument.arguments[0].expression.type ===
28
- 'StringLiteral' &&
29
- CSS_EXT_NAMES.includes((0, path_1.extname)(declarations[0].init.argument.arguments[0].expression.value))) {
30
- declarations[0].init.argument.arguments[0].expression.value = `${declarations[0].init.argument.arguments[0].expression.value}?modules`;
31
- }
32
- return expression;
33
- }
34
31
  }
35
32
  exports.default = AutoCSSModule;
@@ -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,23 @@
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
+ function addLastSlash(path) {
10
+ return path.endsWith('/') ? path : `${path}/`;
11
+ }
12
+ class LockCoreJS extends Visitor_1.default {
13
+ visitImportDeclaration(expression) {
14
+ const { source } = expression;
15
+ let { value, type } = source;
16
+ if (type === 'StringLiteral' && value.startsWith('core-js/')) {
17
+ value = value.replace(/^core-js\//, addLastSlash((0, utils_1.winPath)((0, path_1.dirname)(require.resolve('core-js/package.json')))));
18
+ return Object.assign(Object.assign({}, expression), { source: Object.assign(Object.assign({}, source), { value }) });
19
+ }
20
+ return expression;
21
+ }
22
+ }
23
+ exports.default = LockCoreJS;
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Config as SwcConfig } from '@swc/core';
1
2
  import type { Options as ProxyOptions } from '../compiled/http-proxy-middleware';
2
3
  import { Configuration } from '../compiled/webpack';
3
4
  import Config from '../compiled/webpack-5-chain';
@@ -21,6 +22,7 @@ export declare enum JSMinifier {
21
22
  export declare enum CSSMinifier {
22
23
  esbuild = "esbuild",
23
24
  cssnano = "cssnano",
25
+ parcelCSS = "parcelCSS",
24
26
  none = "none"
25
27
  }
26
28
  export interface ICopy {
@@ -31,9 +33,18 @@ declare type WebpackConfig = Required<Configuration>;
31
33
  declare type IBabelPlugin = Function | string | [string, {
32
34
  [key: string]: any;
33
35
  }];
36
+ export interface DeadCodeParams {
37
+ patterns?: string[];
38
+ exclude?: string[];
39
+ failOnHint?: boolean;
40
+ detectUnusedFiles?: boolean;
41
+ detectUnusedExport?: boolean;
42
+ context?: string;
43
+ }
34
44
  export interface IConfig {
35
45
  alias?: Record<string, string>;
36
46
  autoCSSModules?: boolean;
47
+ base?: string;
37
48
  chainWebpack?: Function;
38
49
  copy?: ICopy[] | string[];
39
50
  cssLoader?: {
@@ -51,6 +62,7 @@ export interface IConfig {
51
62
  };
52
63
  depTranspiler?: Transpiler;
53
64
  devtool?: Config.DevTool;
65
+ deadCode?: DeadCodeParams;
54
66
  externals?: WebpackConfig['externals'];
55
67
  esm?: {
56
68
  [key: string]: any;
@@ -97,4 +109,8 @@ export interface IConfig {
97
109
  writeToDisk?: boolean;
98
110
  [key: string]: any;
99
111
  }
112
+ export interface SwcOptions extends SwcConfig {
113
+ sync?: boolean;
114
+ parseMap?: boolean;
115
+ }
100
116
  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;
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.20220316.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",
@@ -15,80 +25,74 @@
15
25
  "build:client": "pnpm tsc --project ./tsconfig.client.json",
16
26
  "build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
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": "jest -c ../../jest.turbo.config.ts"
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.6.0",
33
+ "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
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.20220316.1",
39
+ "@umijs/mfsu": "4.0.0-canary.20220316.1",
40
+ "@umijs/utils": "4.0.0-canary.20220316.1",
41
+ "css-loader": "6.7.1",
44
42
  "es5-imcompatible-versions": "^0.1.73",
45
- "jest-worker": "27.3.1",
43
+ "jest-worker": "27.5.1",
46
44
  "node-libs-browser": "2.2.1",
47
- "postcss": "^8.3.11",
48
- "postcss-preset-env": "6.7.0",
45
+ "postcss": "^8.4.8",
46
+ "postcss-preset-env": "7.4.2",
49
47
  "react-error-overlay": "6.0.9"
50
48
  },
51
49
  "devDependencies": {
52
- "@svgr/webpack": "5.5.0",
50
+ "@swc/core": "1.2.154",
53
51
  "@types/express": "4.17.13",
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.2",
55
+ "babel-loader": "8.2.3",
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",
58
+ "copy-webpack-plugin": "10.2.4",
59
+ "css-minimizer-webpack-plugin": "3.4.1",
60
+ "cssnano": "5.1.3",
61
+ "express": "4.17.3",
62
+ "fork-ts-checker-webpack-plugin": "7.2.1",
63
+ "http-proxy-middleware": "2.0.4",
65
64
  "less": "4.1.2",
66
65
  "less-loader": "10.2.0",
67
- "mini-css-extract-plugin": "2.4.2",
66
+ "mini-css-extract-plugin": "2.6.0",
68
67
  "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",
68
+ "postcss-loader": "6.2.1",
69
+ "purgecss-webpack-plugin": "4.1.3",
70
+ "react-refresh": "0.11.0",
71
+ "sass-loader": "12.6.0",
72
+ "schema-utils": "4.0.0",
74
73
  "speed-measure-webpack-plugin": "1.5.0",
75
- "style-loader": "3.3.0",
74
+ "style-loader": "3.3.1",
76
75
  "svgo-loader": "3.0.0",
77
- "swc-loader": "0.1.15",
78
76
  "tapable": "2.2.1",
79
- "terser": "5.9.0",
80
- "terser-webpack-plugin": "5.2.4",
77
+ "terser": "5.12.0",
78
+ "terser-webpack-plugin": "5.3.1",
81
79
  "url-loader": "4.1.1",
82
- "webpack": "5.61.0",
80
+ "webpack": "5.70.0",
83
81
  "webpack-5-chain": "8.0.0",
84
82
  "webpack-bundle-analyzer": "4.5.0",
85
- "webpack-dev-middleware": "5.2.1",
86
- "webpack-sources": "3.2.1",
87
- "ws": "8.2.3"
83
+ "webpack-dev-middleware": "5.3.1",
84
+ "webpack-manifest-plugin": "5.0.0",
85
+ "webpack-sources": "3.2.3",
86
+ "ws": "8.5.0"
87
+ },
88
+ "publishConfig": {
89
+ "access": "public"
88
90
  },
91
+ "authors": [
92
+ "chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
93
+ ],
89
94
  "compiledConfig": {
90
95
  "deps": [
91
- "@svgr/webpack",
92
96
  "autoprefixer",
93
97
  "babel-loader",
94
98
  "copy-webpack-plugin",
@@ -98,6 +102,7 @@
98
102
  "compression",
99
103
  "connect-history-api-fallback",
100
104
  "express",
105
+ "fork-ts-checker-webpack-plugin",
101
106
  "http-proxy-middleware",
102
107
  "less",
103
108
  "less-loader",
@@ -108,7 +113,6 @@
108
113
  "sass-loader",
109
114
  "schema-utils",
110
115
  "style-loader",
111
- "swc-loader",
112
116
  "speed-measure-webpack-plugin",
113
117
  "svgo-loader",
114
118
  "tapable",
@@ -118,6 +122,7 @@
118
122
  "webpack-5-chain",
119
123
  "webpack-bundle-analyzer",
120
124
  "webpack-dev-middleware",
125
+ "webpack-manifest-plugin",
121
126
  "webpack-sources",
122
127
  "ws",
123
128
  "./bundles/webpack/bundle",
@@ -136,9 +141,11 @@
136
141
  "tapable": "$$LOCAL",
137
142
  "terser": "$$LOCAL",
138
143
  "terser-webpack-plugin": "$$LOCAL",
144
+ "typescript": "typescript",
139
145
  "uglify-js": "uglify-js",
140
146
  "url-loader": "$$LOCAL",
141
147
  "webpack": "$$LOCAL",
148
+ "webpack/lib/NormalModule": "../webpack/NormalModule",
142
149
  "webpack-5-chain": "$$LOCAL",
143
150
  "webpack-sources": "$$LOCAL",
144
151
  "ws": "$$LOCAL"
@@ -159,7 +166,6 @@
159
166
  "webpack"
160
167
  ],
161
168
  "excludeDtsDeps": [
162
- "@svgr/webpack",
163
169
  "babel-loader",
164
170
  "copy-webpack-plugin",
165
171
  "css-loader",
@@ -167,6 +173,7 @@
167
173
  "cssnano",
168
174
  "compression",
169
175
  "connect-history-api-fallback",
176
+ "fork-ts-checker-webpack-plugin",
170
177
  "less",
171
178
  "less-loader",
172
179
  "mini-css-extract-plugin",
@@ -176,11 +183,11 @@
176
183
  "sass-loader",
177
184
  "speed-measure-webpack-plugin",
178
185
  "style-loader",
179
- "swc-loader",
180
186
  "svgo-loader",
181
187
  "url-loader",
182
188
  "webpack-bundle-analyzer",
183
- "webpack-dev-middleware"
189
+ "webpack-dev-middleware",
190
+ "webpack-manifest-plugin"
184
191
  ]
185
192
  }
186
193
  }
@@ -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.