@umijs/bundler-webpack 4.0.0-beta.7 → 4.0.0-rc.2

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 (134) 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/express/index.js +57 -74
  28. package/compiled/fork-ts-checker-webpack-plugin/LICENSE +21 -0
  29. package/compiled/fork-ts-checker-webpack-plugin/fsevents.node +0 -0
  30. package/compiled/fork-ts-checker-webpack-plugin/index.js +48 -0
  31. package/compiled/fork-ts-checker-webpack-plugin/package.json +1 -0
  32. package/compiled/http-proxy-middleware/dist/types.d.ts +5 -5
  33. package/compiled/http-proxy-middleware/http-proxy/index.d.ts +1 -1
  34. package/compiled/http-proxy-middleware/index.js +10 -10
  35. package/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +60 -8
  36. package/compiled/mini-css-extract-plugin/hmr/normalize-url.js +13 -1
  37. package/compiled/mini-css-extract-plugin/index.js +8103 -7617
  38. package/compiled/mini-css-extract-plugin/loader.js +177 -54
  39. package/compiled/mini-css-extract-plugin/package.json +1 -1
  40. package/compiled/mini-css-extract-plugin/utils.js +83 -24
  41. package/compiled/postcss-loader/index.js +1 -1
  42. package/compiled/react-refresh/index.js +3 -3
  43. package/compiled/sass-loader/index.js +1 -1
  44. package/compiled/schema-utils/ajv/dist/ajv.d.ts +16 -0
  45. package/compiled/schema-utils/ajv/dist/compile/codegen/code.d.ts +39 -0
  46. package/compiled/schema-utils/ajv/dist/compile/codegen/index.d.ts +79 -0
  47. package/compiled/schema-utils/ajv/dist/compile/codegen/scope.d.ts +79 -0
  48. package/compiled/schema-utils/ajv/dist/compile/errors.d.ts +13 -0
  49. package/compiled/schema-utils/ajv/dist/compile/index.d.ts +80 -0
  50. package/compiled/schema-utils/ajv/dist/compile/ref_error.d.ts +5 -0
  51. package/compiled/schema-utils/ajv/dist/compile/resolve.d.ts +12 -0
  52. package/compiled/schema-utils/ajv/dist/compile/rules.d.ts +28 -0
  53. package/compiled/schema-utils/ajv/dist/compile/util.d.ts +40 -0
  54. package/compiled/schema-utils/ajv/dist/compile/validate/index.d.ts +42 -0
  55. package/compiled/schema-utils/ajv/dist/compile/validate/subschema.d.ts +47 -0
  56. package/compiled/schema-utils/ajv/dist/core.d.ts +171 -0
  57. package/compiled/schema-utils/ajv/dist/runtime/validation_error.d.ts +7 -0
  58. package/compiled/schema-utils/ajv/dist/types/index.d.ts +177 -0
  59. package/compiled/schema-utils/ajv/dist/types/json-schema.d.ts +124 -0
  60. package/compiled/schema-utils/ajv/dist/types/jtd-schema.d.ts +168 -0
  61. package/compiled/schema-utils/declarations/validate.d.ts +4 -4
  62. package/compiled/schema-utils/index.js +8 -2
  63. package/compiled/schema-utils/uri-js/dist/es5/uri.all.d.ts +59 -0
  64. package/compiled/style-loader/index.js +1 -1
  65. package/compiled/terser/index.js +1 -1
  66. package/compiled/terser-webpack-plugin/index.js +393 -517
  67. package/compiled/terser-webpack-plugin/jest-worker/build/types.d.ts +1 -0
  68. package/compiled/terser-webpack-plugin/minify.js +10 -3
  69. package/compiled/terser-webpack-plugin/package.json +1 -1
  70. package/compiled/terser-webpack-plugin/types/index.d.ts +183 -149
  71. package/compiled/terser-webpack-plugin/types/minify.d.ts +17 -0
  72. package/compiled/terser-webpack-plugin/types/utils.d.ts +10 -15
  73. package/compiled/terser-webpack-plugin/utils.js +118 -25
  74. package/compiled/webpack/index.js +10464 -5286
  75. package/compiled/webpack-dev-middleware/index.js +11 -5
  76. package/compiled/webpack-dev-middleware/package.json +1 -1
  77. package/compiled/webpack-manifest-plugin/LICENSE +21 -0
  78. package/compiled/webpack-manifest-plugin/index.js +1 -0
  79. package/compiled/webpack-manifest-plugin/package.json +1 -0
  80. package/compiled/webpack-sources/index.js +1 -1
  81. package/compiled/ws/index.d.ts +1 -2
  82. package/compiled/ws/index.js +1 -1
  83. package/dist/build.d.ts +5 -3
  84. package/dist/build.js +2 -1
  85. package/dist/cli.js +4 -7
  86. package/dist/config/assetRules.js +6 -2
  87. package/dist/config/config.d.ts +7 -2
  88. package/dist/config/config.js +50 -8
  89. package/dist/config/cssRules.js +1 -1
  90. package/dist/config/detectDeadCode.d.ts +12 -0
  91. package/dist/config/detectDeadCode.js +120 -0
  92. package/dist/config/detectDeadCodePlugin.d.ts +9 -0
  93. package/dist/config/detectDeadCodePlugin.js +71 -0
  94. package/dist/config/forkTSCheckerPlugin.d.ts +11 -0
  95. package/dist/config/forkTSCheckerPlugin.js +34 -0
  96. package/dist/config/harmonyLinkingErrorPlugin.d.ts +6 -0
  97. package/dist/config/harmonyLinkingErrorPlugin.js +42 -0
  98. package/dist/config/javaScriptRules.d.ts +1 -0
  99. package/dist/config/javaScriptRules.js +32 -21
  100. package/dist/config/manifestPlugin.d.ts +11 -0
  101. package/dist/config/manifestPlugin.js +25 -0
  102. package/dist/config/miniCSSExtractPlugin.d.ts +1 -0
  103. package/dist/config/miniCSSExtractPlugin.js +2 -3
  104. package/dist/config/svgRules.d.ts +1 -0
  105. package/dist/config/svgRules.js +12 -11
  106. package/dist/constants.d.ts +3 -0
  107. package/dist/constants.js +4 -1
  108. package/dist/dev.d.ts +4 -2
  109. package/dist/dev.js +41 -11
  110. package/dist/loader/svgr.d.ts +4 -0
  111. package/dist/loader/svgr.js +67 -0
  112. package/dist/loader/swc.d.ts +4 -0
  113. package/dist/loader/swc.js +79 -0
  114. package/dist/plugins/RuntimePublicPathPlugin.d.ts +4 -0
  115. package/dist/plugins/RuntimePublicPathPlugin.js +20 -0
  116. package/dist/requireHook.js +1 -1
  117. package/dist/schema.js +13 -5
  118. package/dist/server/server.js +20 -1
  119. package/dist/server/ws.d.ts +1 -1
  120. package/dist/server/ws.js +1 -1
  121. package/dist/swcPlugins/autoCSSModules.d.ts +7 -2
  122. package/dist/swcPlugins/autoCSSModules.js +13 -16
  123. package/dist/swcPlugins/lockCoreJS.d.ts +6 -0
  124. package/dist/swcPlugins/lockCoreJS.js +23 -0
  125. package/dist/types.d.ts +15 -0
  126. package/dist/utils/depMatch.js +1 -1
  127. package/package.json +60 -55
  128. package/compiled/@svgr/webpack/.svgo.yml +0 -75
  129. package/compiled/@svgr/webpack/LICENSE +0 -7
  130. package/compiled/@svgr/webpack/index.js +0 -343
  131. package/compiled/@svgr/webpack/package.json +0 -1
  132. package/compiled/swc-loader/LICENSE +0 -25
  133. package/compiled/swc-loader/index.js +0 -1
  134. package/compiled/swc-loader/package.json +0 -1
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-rc.2",
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",
@@ -17,78 +27,70 @@
17
27
  "dev": "pnpm build -- --watch",
18
28
  "generate:webpackPackages": "zx ./scripts/generateWebpackPackages.mjs"
19
29
  },
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"
35
- },
36
30
  "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",
31
+ "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
32
+ "@svgr/core": "6.2.1",
33
+ "@svgr/plugin-jsx": "^6.2.1",
34
+ "@svgr/plugin-svgo": "^6.2.0",
35
+ "@swc/core": "1.2.141",
36
+ "@types/hapi__joi": "17.1.8",
37
+ "@umijs/babel-preset-umi": "4.0.0-rc.2",
38
+ "@umijs/mfsu": "4.0.0-rc.2",
39
+ "@umijs/utils": "4.0.0-rc.2",
40
+ "css-loader": "6.6.0",
44
41
  "es5-imcompatible-versions": "^0.1.73",
45
- "jest-worker": "27.3.1",
42
+ "jest-worker": "27.5.1",
46
43
  "node-libs-browser": "2.2.1",
47
- "postcss": "^8.3.11",
48
- "postcss-preset-env": "6.7.0",
44
+ "postcss": "^8.4.6",
45
+ "postcss-preset-env": "7.4.1",
49
46
  "react-error-overlay": "6.0.9"
50
47
  },
51
48
  "devDependencies": {
52
- "@svgr/webpack": "5.5.0",
53
49
  "@types/express": "4.17.13",
54
50
  "@types/webpack-sources": "3.2.0",
55
- "@types/ws": "8.2.0",
56
- "autoprefixer": "10.3.7",
57
- "babel-loader": "8.2.2",
51
+ "@types/ws": "8.2.2",
52
+ "autoprefixer": "10.4.2",
53
+ "babel-loader": "8.2.3",
58
54
  "compression": "1.7.4",
59
55
  "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",
56
+ "copy-webpack-plugin": "10.2.4",
57
+ "css-minimizer-webpack-plugin": "3.4.1",
58
+ "cssnano": "5.0.17",
59
+ "express": "4.17.3",
60
+ "fork-ts-checker-webpack-plugin": "7.2.1",
61
+ "http-proxy-middleware": "2.0.3",
65
62
  "less": "4.1.2",
66
63
  "less-loader": "10.2.0",
67
- "mini-css-extract-plugin": "2.4.2",
64
+ "mini-css-extract-plugin": "2.5.3",
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.11.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
74
  "tapable": "2.2.1",
79
- "terser": "5.9.0",
80
- "terser-webpack-plugin": "5.2.4",
75
+ "terser": "5.10.0",
76
+ "terser-webpack-plugin": "5.3.1",
81
77
  "url-loader": "4.1.1",
82
- "webpack": "5.61.0",
78
+ "webpack": "5.69.1",
83
79
  "webpack-5-chain": "8.0.0",
84
80
  "webpack-bundle-analyzer": "4.5.0",
85
- "webpack-dev-middleware": "5.2.1",
86
- "webpack-sources": "3.2.1",
87
- "ws": "8.2.3"
81
+ "webpack-dev-middleware": "5.3.1",
82
+ "webpack-manifest-plugin": "4.1.1",
83
+ "webpack-sources": "3.2.3",
84
+ "ws": "8.5.0"
85
+ },
86
+ "publishConfig": {
87
+ "access": "public"
88
88
  },
89
+ "authors": [
90
+ "chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
91
+ ],
89
92
  "compiledConfig": {
90
93
  "deps": [
91
- "@svgr/webpack",
92
94
  "autoprefixer",
93
95
  "babel-loader",
94
96
  "copy-webpack-plugin",
@@ -98,6 +100,7 @@
98
100
  "compression",
99
101
  "connect-history-api-fallback",
100
102
  "express",
103
+ "fork-ts-checker-webpack-plugin",
101
104
  "http-proxy-middleware",
102
105
  "less",
103
106
  "less-loader",
@@ -108,7 +111,6 @@
108
111
  "sass-loader",
109
112
  "schema-utils",
110
113
  "style-loader",
111
- "swc-loader",
112
114
  "speed-measure-webpack-plugin",
113
115
  "svgo-loader",
114
116
  "tapable",
@@ -118,6 +120,7 @@
118
120
  "webpack-5-chain",
119
121
  "webpack-bundle-analyzer",
120
122
  "webpack-dev-middleware",
123
+ "webpack-manifest-plugin",
121
124
  "webpack-sources",
122
125
  "ws",
123
126
  "./bundles/webpack/bundle",
@@ -136,9 +139,11 @@
136
139
  "tapable": "$$LOCAL",
137
140
  "terser": "$$LOCAL",
138
141
  "terser-webpack-plugin": "$$LOCAL",
142
+ "typescript": "typescript",
139
143
  "uglify-js": "uglify-js",
140
144
  "url-loader": "$$LOCAL",
141
145
  "webpack": "$$LOCAL",
146
+ "webpack/lib/NormalModule": "../webpack/NormalModule",
142
147
  "webpack-5-chain": "$$LOCAL",
143
148
  "webpack-sources": "$$LOCAL",
144
149
  "ws": "$$LOCAL"
@@ -159,7 +164,6 @@
159
164
  "webpack"
160
165
  ],
161
166
  "excludeDtsDeps": [
162
- "@svgr/webpack",
163
167
  "babel-loader",
164
168
  "copy-webpack-plugin",
165
169
  "css-loader",
@@ -167,6 +171,7 @@
167
171
  "cssnano",
168
172
  "compression",
169
173
  "connect-history-api-fallback",
174
+ "fork-ts-checker-webpack-plugin",
170
175
  "less",
171
176
  "less-loader",
172
177
  "mini-css-extract-plugin",
@@ -176,11 +181,11 @@
176
181
  "sass-loader",
177
182
  "speed-measure-webpack-plugin",
178
183
  "style-loader",
179
- "swc-loader",
180
184
  "svgo-loader",
181
185
  "url-loader",
182
186
  "webpack-bundle-analyzer",
183
- "webpack-dev-middleware"
187
+ "webpack-dev-middleware",
188
+ "webpack-manifest-plugin"
184
189
  ]
185
190
  }
186
191
  }
@@ -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.