@umijs/bundler-webpack 4.0.0-beta.8 → 4.0.0-canary-20240513.3
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.
- package/client/client/client.js +255 -167
- package/client/constants.d.ts +15 -0
- package/client/constants.js +30 -12
- package/client/utils/formatWebpackMessages.d.ts +12 -0
- package/client/utils/formatWebpackMessages.js +87 -86
- package/compiled/autoprefixer/browserslist/index.d.ts +33 -7
- package/compiled/autoprefixer/index.js +3 -3
- package/compiled/autoprefixer/package.json +1 -1
- package/compiled/autoprefixer/postcss/lib/at-rule.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/comment.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/container.d.ts +2 -2
- package/compiled/autoprefixer/postcss/lib/css-syntax-error.d.ts +55 -8
- package/compiled/autoprefixer/postcss/lib/declaration.d.ts +2 -2
- package/compiled/autoprefixer/postcss/lib/input.d.ts +26 -6
- package/compiled/autoprefixer/postcss/lib/lazy-result.d.ts +11 -10
- package/compiled/autoprefixer/postcss/lib/no-work-result.d.ts +37 -0
- package/compiled/autoprefixer/postcss/lib/node.d.ts +38 -4
- package/compiled/autoprefixer/postcss/lib/postcss.d.ts +31 -30
- package/compiled/autoprefixer/postcss/lib/processor.d.ts +6 -5
- package/compiled/autoprefixer/postcss/lib/result.d.ts +3 -2
- package/compiled/autoprefixer/postcss/lib/rule.d.ts +1 -1
- package/compiled/autoprefixer/postcss/lib/warning.d.ts +37 -3
- package/compiled/autoprefixer/source-map-js/source-map.d.ts +99 -82
- package/compiled/babel-loader/index.js +8 -2
- package/compiled/babel-loader/package.json +1 -1
- package/compiled/copy-webpack-plugin/939.index.js +1171 -0
- package/compiled/copy-webpack-plugin/index.js +16 -10
- package/compiled/copy-webpack-plugin/package.json +1 -1
- package/compiled/css-minimizer-webpack-plugin/index.js +8 -2
- package/compiled/css-minimizer-webpack-plugin/minify.js +23 -22
- package/compiled/css-minimizer-webpack-plugin/package.json +1 -1
- package/compiled/css-minimizer-webpack-plugin/utils.js +305 -54
- package/compiled/cssnano/index.js +12 -11
- package/compiled/cssnano/package.json +1 -1
- package/compiled/express.d.ts +2 -0
- package/compiled/file-loader/index.js +3 -0
- package/compiled/file-loader/package.json +1 -0
- package/compiled/less-loader/index.js +1 -1
- package/compiled/less-loader/package.json +1 -1
- package/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js +60 -46
- package/compiled/mini-css-extract-plugin/hmr/normalize-url.js +10 -6
- package/compiled/mini-css-extract-plugin/index.js +10669 -10348
- package/compiled/mini-css-extract-plugin/loader.js +159 -100
- package/compiled/mini-css-extract-plugin/package.json +1 -1
- package/compiled/mini-css-extract-plugin/utils.js +88 -44
- package/compiled/postcss-loader/index.js +1 -1
- package/compiled/postcss-loader/package.json +1 -1
- package/compiled/sass-loader/index.js +1 -1
- package/compiled/sass-loader/package.json +1 -1
- package/compiled/sass-loader/sass.default.dart.js +4 -0
- package/compiled/schema-utils/ajv/dist/ajv.d.ts +16 -0
- package/compiled/schema-utils/ajv/dist/compile/codegen/code.d.ts +39 -0
- package/compiled/schema-utils/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/compiled/schema-utils/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/compiled/schema-utils/ajv/dist/compile/errors.d.ts +13 -0
- package/compiled/schema-utils/ajv/dist/compile/index.d.ts +80 -0
- package/compiled/schema-utils/ajv/dist/compile/ref_error.d.ts +5 -0
- package/compiled/schema-utils/ajv/dist/compile/resolve.d.ts +12 -0
- package/compiled/schema-utils/ajv/dist/compile/rules.d.ts +28 -0
- package/compiled/schema-utils/ajv/dist/compile/util.d.ts +40 -0
- package/compiled/schema-utils/ajv/dist/compile/validate/index.d.ts +42 -0
- package/compiled/schema-utils/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/compiled/schema-utils/ajv/dist/core.d.ts +171 -0
- package/compiled/schema-utils/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/compiled/schema-utils/ajv/dist/types/index.d.ts +177 -0
- package/compiled/schema-utils/ajv/dist/types/json-schema.d.ts +124 -0
- package/compiled/schema-utils/ajv/dist/types/jtd-schema.d.ts +168 -0
- package/compiled/schema-utils/declarations/validate.d.ts +4 -4
- package/compiled/schema-utils/index.js +8 -2
- package/compiled/schema-utils/uri-js/dist/es5/uri.all.d.ts +59 -0
- package/compiled/style-loader/index.js +1 -1
- package/compiled/stylus-loader/LICENSE +20 -0
- package/compiled/stylus-loader/index.js +44 -0
- package/compiled/stylus-loader/package.json +1 -0
- package/compiled/terser/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +90 -0
- package/compiled/terser/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
- package/compiled/terser/@jridgewell/gen-mapping/dist/types/types.d.ts +35 -0
- package/compiled/terser/@jridgewell/source-map/dist/types/source-map.d.ts +25 -0
- package/compiled/terser/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
- package/compiled/terser/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +74 -0
- package/compiled/terser/@jridgewell/trace-mapping/dist/types/types.d.ts +92 -0
- package/compiled/terser/index.js +1 -1
- package/compiled/terser/package.json +1 -1
- package/compiled/terser/tools/terser.d.ts +6 -3
- package/compiled/terser-webpack-plugin/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
- package/compiled/terser-webpack-plugin/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +74 -0
- package/compiled/terser-webpack-plugin/@jridgewell/trace-mapping/dist/types/types.d.ts +92 -0
- package/compiled/terser-webpack-plugin/index.js +1390 -3693
- package/compiled/terser-webpack-plugin/jest-worker/build/types.d.ts +1 -0
- package/compiled/terser-webpack-plugin/minify.js +10 -3
- package/compiled/terser-webpack-plugin/package.json +1 -1
- package/compiled/terser-webpack-plugin/types/index.d.ts +186 -152
- package/compiled/terser-webpack-plugin/types/minify.d.ts +17 -0
- package/compiled/terser-webpack-plugin/types/utils.d.ts +20 -24
- package/compiled/terser-webpack-plugin/utils.js +153 -34
- package/compiled/webpack/BasicEffectRulePlugin.js +1 -0
- package/compiled/webpack/BasicEvaluatedExpression.js +1 -0
- package/compiled/webpack/BasicMatcherRulePlugin.js +1 -0
- package/compiled/webpack/ExternalsPlugin.js +1 -0
- package/compiled/webpack/FetchCompileAsyncWasmPlugin.js +1 -0
- package/compiled/webpack/FetchCompileWasmPlugin.js +1 -0
- package/compiled/webpack/HotModuleReplacement.runtime.js +29 -14
- package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +4 -3
- package/compiled/webpack/LimitChunkCountPlugin.js +1 -0
- package/compiled/webpack/NodeTargetPlugin.js +1 -0
- package/compiled/webpack/NodeTemplatePlugin.js +1 -0
- package/compiled/webpack/ObjectMatcherRulePlugin.js +1 -0
- package/compiled/webpack/RuleSetCompiler.js +1 -0
- package/compiled/webpack/StringXor.js +1 -0
- package/compiled/webpack/UseEffectRulePlugin.js +1 -0
- package/compiled/webpack/WebWorkerTemplatePlugin.js +1 -0
- package/compiled/webpack/deepImports.json +15 -1
- package/compiled/webpack/index.js +26404 -10329
- package/compiled/webpack/json-schema/index.d.ts +8 -1
- package/compiled/webpack/lazy-compilation-node.js +10 -0
- package/compiled/webpack/lazy-compilation-web.js +9 -0
- package/compiled/webpack/types.d.ts +823 -287
- package/compiled/webpack-5-chain/index.js +1 -1
- package/compiled/webpack-5-chain/package.json +1 -1
- package/compiled/webpack-5-chain/types/index.d.ts +76 -20
- package/compiled/webpack-bundle-analyzer/index.js +7 -6
- package/compiled/webpack-bundle-analyzer/package.json +1 -1
- package/compiled/webpack-bundle-analyzer/public/viewer.js +2 -2
- package/compiled/webpack-bundle-analyzer/public/viewer.js.map +1 -1
- package/compiled/webpack-dev-middleware/index.js +12 -5
- package/compiled/webpack-dev-middleware/package.json +1 -1
- package/compiled/{tapable → webpack-manifest-plugin}/LICENSE +2 -2
- package/compiled/webpack-manifest-plugin/index.js +1 -0
- package/compiled/webpack-manifest-plugin/package.json +1 -0
- package/compiled/webpack-sources/index.js +1 -1
- package/compiled/{express → webpackbar}/LICENSE +1 -5
- package/compiled/webpackbar/dist/index.d.ts +121 -0
- package/compiled/webpackbar/index.js +7 -0
- package/compiled/webpackbar/package.json +1 -0
- package/compiled/ws/LICENSE +13 -12
- package/compiled/ws/index.d.ts +74 -35
- package/compiled/ws/index.js +1 -1
- package/compiled/ws/package.json +1 -1
- package/dist/build.d.ts +8 -3
- package/dist/build.js +147 -68
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +84 -81
- package/dist/config/_sampleFeature.js +33 -20
- package/dist/config/assetRules.js +46 -55
- package/dist/config/bundleAnalyzerPlugin.js +41 -28
- package/dist/config/compressPlugin.js +125 -74
- package/dist/config/config.d.ts +11 -2
- package/dist/config/config.js +235 -172
- package/dist/config/copyPlugin.js +61 -47
- package/dist/config/cssRules.js +162 -95
- package/dist/config/definePlugin.d.ts +2 -0
- package/dist/config/definePlugin.js +59 -39
- package/dist/config/detectCssModulesInDependence.d.ts +10 -0
- package/dist/config/detectCssModulesInDependence.js +151 -0
- package/dist/config/detectDeadCode.d.ts +12 -0
- package/dist/config/detectDeadCode.js +191 -0
- package/dist/config/detectDeadCodePlugin.d.ts +9 -0
- package/dist/config/detectDeadCodePlugin.js +82 -0
- package/dist/config/fastRefreshPlugin.js +46 -31
- package/dist/config/forkTSCheckerPlugin.d.ts +11 -0
- package/dist/config/forkTSCheckerPlugin.js +49 -0
- package/dist/config/harmonyLinkingErrorPlugin.d.ts +6 -0
- package/dist/config/harmonyLinkingErrorPlugin.js +53 -0
- package/dist/config/ignorePlugin.js +38 -25
- package/dist/config/javaScriptRules.d.ts +2 -0
- package/dist/config/javaScriptRules.js +186 -150
- package/dist/config/manifestPlugin.d.ts +11 -0
- package/dist/config/manifestPlugin.js +40 -0
- package/dist/config/miniCSSExtractPlugin.d.ts +1 -0
- package/dist/config/miniCSSExtractPlugin.js +52 -31
- package/dist/config/nodePolyfill.js +49 -32
- package/dist/config/nodePrefixPlugin.d.ts +11 -0
- package/dist/config/nodePrefixPlugin.js +38 -0
- package/dist/config/progressPlugin.js +50 -24
- package/dist/config/purgecssWebpackPlugin.js +41 -30
- package/dist/config/speedMeasureWebpackPlugin.js +56 -31
- package/dist/config/ssrPlugin.d.ts +11 -0
- package/dist/config/ssrPlugin.js +98 -0
- package/dist/config/svgRules.d.ts +1 -0
- package/dist/config/svgRules.js +68 -54
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +59 -15
- package/dist/dev.d.ts +23 -3
- package/dist/dev.js +198 -81
- package/dist/index.d.ts +6 -2
- package/dist/index.js +31 -15
- package/dist/loader/svgr.d.ts +4 -0
- package/dist/loader/svgr.js +84 -0
- package/dist/loader/swc.d.ts +4 -0
- package/dist/loader/swc.js +149 -0
- package/dist/parcelCSS.d.ts +2 -0
- package/dist/parcelCSS.js +39 -0
- package/dist/plugins/EsbuildMinifyFix.d.ts +8 -0
- package/dist/plugins/EsbuildMinifyFix.js +136 -0
- package/dist/plugins/ProgressPlugin.js +68 -43
- package/dist/plugins/RuntimePublicPathPlugin.d.ts +4 -0
- package/dist/plugins/RuntimePublicPathPlugin.js +45 -0
- package/dist/plugins/_SamplePlugin.d.ts +1 -1
- package/dist/plugins/_SamplePlugin.js +37 -14
- package/dist/requireHook.js +44 -27
- package/dist/schema.d.ts +4 -3
- package/dist/schema.js +175 -69
- package/dist/server/server.d.ts +4 -3
- package/dist/server/server.js +219 -154
- package/dist/server/ws.d.ts +8 -3
- package/dist/server/ws.js +72 -38
- package/dist/swcPlugins/autoCSSModules.d.ts +11 -2
- package/dist/swcPlugins/autoCSSModules.js +60 -32
- package/dist/swcPlugins/changeImportFromString.d.ts +2 -0
- package/dist/swcPlugins/changeImportFromString.js +32 -0
- package/dist/swcPlugins/lockCoreJS.d.ts +6 -0
- package/dist/swcPlugins/lockCoreJS.js +56 -0
- package/dist/types.d.ts +53 -9
- package/dist/types.js +61 -29
- package/dist/utils/browsersList.js +31 -8
- package/dist/utils/depMatch.js +65 -39
- package/dist/utils/formatWebpackMessages.js +119 -91
- package/dist/utils/getEsBuildTarget.d.ts +7 -0
- package/dist/utils/getEsBuildTarget.js +46 -0
- package/dist/utils/pkgUpContainsName.d.ts +1 -0
- package/dist/utils/pkgUpContainsName.js +50 -0
- package/package.json +89 -81
- package/compiled/@svgr/webpack/.svgo.yml +0 -75
- package/compiled/@svgr/webpack/LICENSE +0 -7
- package/compiled/@svgr/webpack/index.js +0 -343
- package/compiled/@svgr/webpack/package.json +0 -1
- package/compiled/css-loader/api.js +0 -102
- package/compiled/css-loader/getUrl.js +0 -29
- package/compiled/css-loader/index.js +0 -2
- package/compiled/css-loader/noSourceMaps.js +0 -5
- package/compiled/css-loader/package.json +0 -1
- package/compiled/css-loader/sourceMaps.js +0 -22
- package/compiled/express/body-parser/index.d.ts +0 -104
- package/compiled/express/connect/index.d.ts +0 -93
- package/compiled/express/express-serve-static-core/index.d.ts +0 -1252
- package/compiled/express/index.d.ts +0 -133
- package/compiled/express/index.js +0 -338
- package/compiled/express/mime/index.d.ts +0 -35
- package/compiled/express/package.json +0 -1
- package/compiled/express/qs/index.d.ts +0 -62
- package/compiled/express/range-parser/index.d.ts +0 -35
- package/compiled/express/serve-static/index.d.ts +0 -108
- package/compiled/http-proxy-middleware/LICENSE +0 -22
- package/compiled/http-proxy-middleware/dist/index.d.ts +0 -4
- package/compiled/http-proxy-middleware/dist/types.d.ts +0 -54
- package/compiled/http-proxy-middleware/http-proxy/index.d.ts +0 -226
- package/compiled/http-proxy-middleware/index.js +0 -66
- package/compiled/http-proxy-middleware/package.json +0 -1
- package/compiled/less/index.js +0 -31
- package/compiled/less/package.json +0 -1
- package/compiled/react-refresh/index.js +0 -19
- package/compiled/swc-loader/LICENSE +0 -25
- package/compiled/swc-loader/index.js +0 -1
- package/compiled/swc-loader/package.json +0 -1
- package/compiled/tapable/index.js +0 -1
- package/compiled/tapable/package.json +0 -1
- package/compiled/tapable/tapable.d.ts +0 -116
- package/dist/build.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/client/client.d.ts.map +0 -1
- package/dist/client/client.js +0 -239
- package/dist/config/_sampleFeature.d.ts.map +0 -1
- package/dist/config/assetRules.d.ts.map +0 -1
- package/dist/config/bundleAnalyzerPlugin.d.ts.map +0 -1
- package/dist/config/compressPlugin.d.ts.map +0 -1
- package/dist/config/config.d.ts.map +0 -1
- package/dist/config/copyPlugin.d.ts.map +0 -1
- package/dist/config/cssRules.d.ts.map +0 -1
- package/dist/config/definePlugin.d.ts.map +0 -1
- package/dist/config/fastRefreshPlugin.d.ts.map +0 -1
- package/dist/config/ignorePlugin.d.ts.map +0 -1
- package/dist/config/javaScriptRules.d.ts.map +0 -1
- package/dist/config/miniCSSExtractPlugin.d.ts.map +0 -1
- package/dist/config/nodePolyfill.d.ts.map +0 -1
- package/dist/config/progressPlugin.d.ts.map +0 -1
- package/dist/config/purgecssWebpackPlugin.d.ts.map +0 -1
- package/dist/config/speedMeasureWebpackPlugin.d.ts.map +0 -1
- package/dist/config/svgRules.d.ts.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/dev.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts +0 -11
- package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts.map +0 -1
- package/dist/plugins/ESBuildCSSMinifyPlugin.js +0 -65
- package/dist/plugins/ProgressPlugin.d.ts.map +0 -1
- package/dist/plugins/_SamplePlugin.d.ts.map +0 -1
- package/dist/requireHook.d.ts.map +0 -1
- package/dist/schema.d.ts.map +0 -1
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/ws.d.ts.map +0 -1
- package/dist/swcPlugins/autoCSSModules.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/browsersList.d.ts.map +0 -1
- package/dist/utils/depMatch.d.ts.map +0 -1
- package/dist/utils/formatWebpackMessages.d.ts.map +0 -1
- /package/{dist → client}/client/client.d.ts +0 -0
- /package/compiled/{css-loader → file-loader}/LICENSE +0 -0
|
@@ -1,100 +1,128 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
10
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/utils/formatWebpackMessages.ts
|
|
30
|
+
var formatWebpackMessages_exports = {};
|
|
31
|
+
__export(formatWebpackMessages_exports, {
|
|
32
|
+
formatMessage: () => formatMessage,
|
|
33
|
+
formatWebpackMessages: () => formatWebpackMessages
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(formatWebpackMessages_exports);
|
|
36
|
+
var import_strip_ansi = __toESM(require("@umijs/utils/compiled/strip-ansi"));
|
|
37
|
+
var friendlySyntaxErrorLabel = "Syntax error:";
|
|
9
38
|
function isLikelyASyntaxError(message) {
|
|
10
|
-
|
|
39
|
+
return (0, import_strip_ansi.default)(message).indexOf(friendlySyntaxErrorLabel) !== -1;
|
|
11
40
|
}
|
|
12
41
|
function formatMessage(message) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
message.
|
|
22
|
-
|
|
23
|
-
lines = message['message'].split('\n');
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
// Strip webpack-added headers off errors/warnings
|
|
28
|
-
// https://github.com/webpack/webpack/blob/master/lib/ModuleError.js
|
|
29
|
-
lines = lines.filter((line) => !/Module [A-z ]+\(from/.test(line));
|
|
30
|
-
// Transform parsing error into syntax error
|
|
31
|
-
// TODO: move this to our ESLint formatter?
|
|
32
|
-
lines = lines.map((line) => {
|
|
33
|
-
const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(line);
|
|
34
|
-
if (!parsingError) {
|
|
35
|
-
return line;
|
|
36
|
-
}
|
|
37
|
-
const [, errorLine, errorColumn, errorMessage] = parsingError;
|
|
38
|
-
return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;
|
|
42
|
+
let lines = [];
|
|
43
|
+
if (typeof message === "string") {
|
|
44
|
+
lines = message.split("\n");
|
|
45
|
+
} else if ("message" in message) {
|
|
46
|
+
lines = message["message"].split("\n");
|
|
47
|
+
} else if (Array.isArray(message)) {
|
|
48
|
+
message.forEach((message2) => {
|
|
49
|
+
if ("message" in message2) {
|
|
50
|
+
lines = message2["message"].split("\n");
|
|
51
|
+
}
|
|
39
52
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// Remove leading newline
|
|
49
|
-
if (lines.length > 2 && lines[1].trim() === '') {
|
|
50
|
-
lines.splice(1, 1);
|
|
51
|
-
}
|
|
52
|
-
// Clean up file name
|
|
53
|
-
lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, '$1');
|
|
54
|
-
// Cleans up verbose "module not found" messages for files and packages.
|
|
55
|
-
if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {
|
|
56
|
-
lines = [
|
|
57
|
-
lines[0],
|
|
58
|
-
lines[1]
|
|
59
|
-
.replace('Error: ', '')
|
|
60
|
-
.replace('Module not found: Cannot find file:', 'Cannot find file:'),
|
|
61
|
-
];
|
|
53
|
+
}
|
|
54
|
+
lines = lines.filter((line) => !/Module [A-z ]+\(from/.test(line));
|
|
55
|
+
lines = lines.map((line) => {
|
|
56
|
+
const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(
|
|
57
|
+
line
|
|
58
|
+
);
|
|
59
|
+
if (!parsingError) {
|
|
60
|
+
return line;
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
62
|
+
const [, errorLine, errorColumn, errorMessage] = parsingError;
|
|
63
|
+
return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;
|
|
64
|
+
});
|
|
65
|
+
message = lines.join("\n");
|
|
66
|
+
message = message.replace(
|
|
67
|
+
/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g,
|
|
68
|
+
`${friendlySyntaxErrorLabel} $3 ($1:$2)
|
|
69
|
+
`
|
|
70
|
+
);
|
|
71
|
+
message = message.replace(
|
|
72
|
+
/^.*export '(.+?)' was not found in '(.+?)'.*$/gm,
|
|
73
|
+
`Attempted import error: '$1' is not exported from '$2'.`
|
|
74
|
+
);
|
|
75
|
+
message = message.replace(
|
|
76
|
+
/^.*export 'default' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm,
|
|
77
|
+
`Attempted import error: '$2' does not contain a default export (imported as '$1').`
|
|
78
|
+
);
|
|
79
|
+
message = message.replace(
|
|
80
|
+
/^.*export '(.+?)' \(imported as '(.+?)'\) was not found in '(.+?)'.*$/gm,
|
|
81
|
+
`Attempted import error: '$1' is not exported from '$3' (imported as '$2').`
|
|
82
|
+
);
|
|
83
|
+
lines = message.split("\n");
|
|
84
|
+
if (lines.length > 2 && lines[1].trim() === "") {
|
|
85
|
+
lines.splice(1, 1);
|
|
86
|
+
}
|
|
87
|
+
lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, "$1");
|
|
88
|
+
if (lines[1] && lines[1].indexOf("Module not found: ") === 0) {
|
|
89
|
+
lines = [
|
|
90
|
+
lines[0],
|
|
91
|
+
lines[1].replace("Error: ", "").replace("Module not found: Cannot find file:", "Cannot find file:")
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {
|
|
95
|
+
lines[1] = "To import Sass files, you first need to install sass.\n";
|
|
96
|
+
lines[1] += "Run `npm install sass` or `yarn add sass` inside your workspace.";
|
|
97
|
+
}
|
|
98
|
+
message = lines.join("\n");
|
|
99
|
+
message = message.replace(
|
|
100
|
+
/^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm,
|
|
101
|
+
""
|
|
102
|
+
);
|
|
103
|
+
message = message.replace(/^\s*at\s<anonymous>(\n|$)/gm, "");
|
|
104
|
+
lines = message.split("\n");
|
|
105
|
+
lines = lines.filter(
|
|
106
|
+
(line, index, arr) => index === 0 || line.trim() !== "" || line.trim() !== arr[index - 1].trim()
|
|
107
|
+
);
|
|
108
|
+
message = lines.join("\n");
|
|
109
|
+
return message.trim();
|
|
84
110
|
}
|
|
85
|
-
exports.formatMessage = formatMessage;
|
|
86
111
|
function formatWebpackMessages(json) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return result;
|
|
112
|
+
const formattedErrors = json.errors.map(function(message) {
|
|
113
|
+
return formatMessage(message);
|
|
114
|
+
});
|
|
115
|
+
const formattedWarnings = json.warnings.map(function(message) {
|
|
116
|
+
return formatMessage(message);
|
|
117
|
+
});
|
|
118
|
+
const result = { errors: formattedErrors, warnings: formattedWarnings };
|
|
119
|
+
if (result.errors.some(isLikelyASyntaxError)) {
|
|
120
|
+
result.errors = result.errors.filter(isLikelyASyntaxError);
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
99
123
|
}
|
|
100
|
-
|
|
124
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
125
|
+
0 && (module.exports = {
|
|
126
|
+
formatMessage,
|
|
127
|
+
formatWebpackMessages
|
|
128
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/utils/getEsBuildTarget.ts
|
|
20
|
+
var getEsBuildTarget_exports = {};
|
|
21
|
+
__export(getEsBuildTarget_exports, {
|
|
22
|
+
getEsBuildTarget: () => getEsBuildTarget
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(getEsBuildTarget_exports);
|
|
25
|
+
var import_utils = require("@umijs/utils");
|
|
26
|
+
var import_constants = require("../constants");
|
|
27
|
+
var import_types = require("../types");
|
|
28
|
+
function getEsBuildTarget({ targets, jsMinifier }) {
|
|
29
|
+
if (targets["ie"] && jsMinifier === import_types.JSMinifier.esbuild) {
|
|
30
|
+
import_utils.logger.error(
|
|
31
|
+
`${import_utils.chalk.red(
|
|
32
|
+
`jsMinifier: esbuild`
|
|
33
|
+
)} is not supported when there is ie in the targets, you can use ${import_utils.chalk.green(
|
|
34
|
+
`jsMinifier: 'terser'`
|
|
35
|
+
)}`
|
|
36
|
+
);
|
|
37
|
+
throw new Error("IE is not supported");
|
|
38
|
+
}
|
|
39
|
+
return Object.keys(targets).filter((key) => import_constants.DEFAULT_ESBUILD_TARGET_KEYS.includes(key)).map((key) => {
|
|
40
|
+
return `${key}${targets[key] === true ? "0" : targets[key]}`;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
getEsBuildTarget
|
|
46
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function pkgUpContainsName(file: string): string | null;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/utils/pkgUpContainsName.ts
|
|
30
|
+
var pkgUpContainsName_exports = {};
|
|
31
|
+
__export(pkgUpContainsName_exports, {
|
|
32
|
+
pkgUpContainsName: () => pkgUpContainsName
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pkgUpContainsName_exports);
|
|
35
|
+
var import_utils = require("@umijs/utils");
|
|
36
|
+
var import_path = __toESM(require("path"));
|
|
37
|
+
function pkgUpContainsName(file) {
|
|
38
|
+
let pkgPath = import_utils.pkgUp.pkgUpSync({ cwd: file });
|
|
39
|
+
if (!pkgPath)
|
|
40
|
+
return null;
|
|
41
|
+
const { name } = require(pkgPath);
|
|
42
|
+
if (!name) {
|
|
43
|
+
return pkgUpContainsName(import_path.default.resolve(pkgPath, "../.."));
|
|
44
|
+
}
|
|
45
|
+
return pkgPath;
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
pkgUpContainsName
|
|
50
|
+
});
|
package/package.json
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-webpack",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-canary-20240513.3",
|
|
4
4
|
"description": "@umijs/bundler-webpack",
|
|
5
|
+
"homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-webpack#readme",
|
|
6
|
+
"bugs": "https://github.com/umijs/umi/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/umijs/umi"
|
|
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",
|
|
10
20
|
"compiled",
|
|
11
21
|
"dist"
|
|
12
22
|
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "pnpm tsc",
|
|
15
|
-
"build:client": "pnpm tsc --project ./tsconfig.client.json",
|
|
16
|
-
"build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
|
|
17
|
-
"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"
|
|
35
|
-
},
|
|
36
23
|
"dependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@umijs/
|
|
42
|
-
"@umijs/
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
24
|
+
"@svgr/core": "6.5.1",
|
|
25
|
+
"@svgr/plugin-jsx": "^6.5.1",
|
|
26
|
+
"@svgr/plugin-svgo": "^6.5.1",
|
|
27
|
+
"@types/hapi__joi": "17.1.9",
|
|
28
|
+
"@umijs/case-sensitive-paths-webpack-plugin": "^1.0.1",
|
|
29
|
+
"@umijs/react-refresh-webpack-plugin": "0.5.11",
|
|
30
|
+
"cors": "^2.8.5",
|
|
31
|
+
"css-loader": "6.7.1",
|
|
32
|
+
"es5-imcompatible-versions": "^0.1.78",
|
|
33
|
+
"fork-ts-checker-webpack-plugin": "8.0.0",
|
|
34
|
+
"jest-worker": "29.4.3",
|
|
35
|
+
"lightningcss": "1.22.1",
|
|
46
36
|
"node-libs-browser": "2.2.1",
|
|
47
|
-
"postcss": "^8.
|
|
48
|
-
"postcss-preset-env": "
|
|
49
|
-
"react-error-overlay": "6.0.9"
|
|
37
|
+
"postcss": "^8.4.21",
|
|
38
|
+
"postcss-preset-env": "7.5.0",
|
|
39
|
+
"react-error-overlay": "6.0.9",
|
|
40
|
+
"react-refresh": "0.14.0",
|
|
41
|
+
"@umijs/babel-preset-umi": "4.0.0-canary-20240513.3",
|
|
42
|
+
"@umijs/bundler-utils": "4.0.0-canary-20240513.3",
|
|
43
|
+
"@umijs/mfsu": "4.0.0-canary-20240513.3",
|
|
44
|
+
"@umijs/utils": "4.0.0-canary-20240513.3"
|
|
50
45
|
},
|
|
51
46
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@types/
|
|
47
|
+
"@swc/core": "1.3.67",
|
|
48
|
+
"@types/cors": "^2.8.13",
|
|
49
|
+
"@types/webpack-bundle-analyzer": "^4.6.0",
|
|
54
50
|
"@types/webpack-sources": "3.2.0",
|
|
55
|
-
"@types/ws": "8.
|
|
56
|
-
"autoprefixer": "10.
|
|
57
|
-
"babel-loader": "
|
|
51
|
+
"@types/ws": "8.5.4",
|
|
52
|
+
"autoprefixer": "10.4.13",
|
|
53
|
+
"babel-loader": "9.1.3",
|
|
58
54
|
"compression": "1.7.4",
|
|
59
55
|
"connect-history-api-fallback": "1.6.0",
|
|
60
|
-
"copy-webpack-plugin": "
|
|
61
|
-
"css-minimizer-webpack-plugin": "
|
|
62
|
-
"cssnano": "5.
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"less-loader": "10.2.0",
|
|
67
|
-
"mini-css-extract-plugin": "2.4.2",
|
|
56
|
+
"copy-webpack-plugin": "10.2.4",
|
|
57
|
+
"css-minimizer-webpack-plugin": "5.0.1",
|
|
58
|
+
"cssnano": "5.1.7",
|
|
59
|
+
"file-loader": "6.2.0",
|
|
60
|
+
"less-loader": "11.1.0",
|
|
61
|
+
"mini-css-extract-plugin": "2.7.2",
|
|
68
62
|
"postcss-flexbugs-fixes": "5.0.2",
|
|
69
|
-
"postcss-loader": "
|
|
70
|
-
"purgecss-webpack-plugin": "4.
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"schema-utils": "3.1.1",
|
|
63
|
+
"postcss-loader": "7.0.2",
|
|
64
|
+
"purgecss-webpack-plugin": "4.1.3",
|
|
65
|
+
"sass-loader": "13.2.0",
|
|
66
|
+
"schema-utils": "4.0.0",
|
|
74
67
|
"speed-measure-webpack-plugin": "1.5.0",
|
|
75
|
-
"style-loader": "3.3.
|
|
68
|
+
"style-loader": "3.3.1",
|
|
69
|
+
"stylus-loader": "7.1.3",
|
|
76
70
|
"svgo-loader": "3.0.0",
|
|
77
|
-
"swc-
|
|
78
|
-
"
|
|
79
|
-
"terser": "5.
|
|
80
|
-
"terser-webpack-plugin": "5.2.4",
|
|
71
|
+
"swc-plugin-auto-css-modules": "1.5.0",
|
|
72
|
+
"terser": "5.16.1",
|
|
73
|
+
"terser-webpack-plugin": "5.3.6",
|
|
81
74
|
"url-loader": "4.1.1",
|
|
82
|
-
"webpack": "5.
|
|
83
|
-
"webpack-5-chain": "8.0.
|
|
84
|
-
"webpack-bundle-analyzer": "4.
|
|
85
|
-
"webpack-dev-middleware": "
|
|
86
|
-
"webpack-
|
|
87
|
-
"
|
|
75
|
+
"webpack": "5.88.2",
|
|
76
|
+
"webpack-5-chain": "8.0.1",
|
|
77
|
+
"webpack-bundle-analyzer": "4.7.0",
|
|
78
|
+
"webpack-dev-middleware": "6.0.1",
|
|
79
|
+
"webpack-manifest-plugin": "5.0.0",
|
|
80
|
+
"webpack-sources": "3.2.3",
|
|
81
|
+
"webpackbar": "5.0.2",
|
|
82
|
+
"ws": "8.12.0"
|
|
88
83
|
},
|
|
84
|
+
"publishConfig": {
|
|
85
|
+
"access": "public"
|
|
86
|
+
},
|
|
87
|
+
"authors": [
|
|
88
|
+
"chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
|
|
89
|
+
],
|
|
89
90
|
"compiledConfig": {
|
|
90
91
|
"deps": [
|
|
91
|
-
"@svgr/webpack",
|
|
92
92
|
"autoprefixer",
|
|
93
93
|
"babel-loader",
|
|
94
94
|
"copy-webpack-plugin",
|
|
@@ -97,9 +97,6 @@
|
|
|
97
97
|
"cssnano",
|
|
98
98
|
"compression",
|
|
99
99
|
"connect-history-api-fallback",
|
|
100
|
-
"express",
|
|
101
|
-
"http-proxy-middleware",
|
|
102
|
-
"less",
|
|
103
100
|
"less-loader",
|
|
104
101
|
"mini-css-extract-plugin",
|
|
105
102
|
"postcss-flexbugs-fixes",
|
|
@@ -108,40 +105,44 @@
|
|
|
108
105
|
"sass-loader",
|
|
109
106
|
"schema-utils",
|
|
110
107
|
"style-loader",
|
|
111
|
-
"swc-loader",
|
|
112
108
|
"speed-measure-webpack-plugin",
|
|
113
109
|
"svgo-loader",
|
|
114
|
-
"tapable",
|
|
115
110
|
"terser",
|
|
116
111
|
"terser-webpack-plugin",
|
|
117
112
|
"url-loader",
|
|
113
|
+
"file-loader",
|
|
118
114
|
"webpack-5-chain",
|
|
119
115
|
"webpack-bundle-analyzer",
|
|
120
116
|
"webpack-dev-middleware",
|
|
117
|
+
"webpack-manifest-plugin",
|
|
121
118
|
"webpack-sources",
|
|
119
|
+
"webpackbar",
|
|
122
120
|
"ws",
|
|
123
121
|
"./bundles/webpack/bundle",
|
|
124
|
-
"
|
|
122
|
+
"stylus-loader"
|
|
125
123
|
],
|
|
126
124
|
"externals": {
|
|
127
125
|
"@swc/core": "@swc/core",
|
|
128
126
|
"@babel/core": "@umijs/bundler-utils/compiled/babel/core",
|
|
129
127
|
"es-module-lexer": "@umijs/bundler-utils/compiled/es-module-lexer",
|
|
130
128
|
"esbuild": "@umijs/bundler-utils/compiled/esbuild",
|
|
131
|
-
"express": "
|
|
129
|
+
"express": "@umijs/bundler-utils/compiled/express",
|
|
132
130
|
"jest-worker": "jest-worker",
|
|
133
|
-
"less": "
|
|
131
|
+
"less": "@umijs/bundler-utils/compiled/less",
|
|
134
132
|
"cssnano": "$$LOCAL",
|
|
135
133
|
"postcss": "postcss",
|
|
136
|
-
"tapable": "
|
|
134
|
+
"tapable": "@umijs/bundler-utils/compiled/tapable",
|
|
137
135
|
"terser": "$$LOCAL",
|
|
138
136
|
"terser-webpack-plugin": "$$LOCAL",
|
|
137
|
+
"typescript": "typescript",
|
|
139
138
|
"uglify-js": "uglify-js",
|
|
140
139
|
"url-loader": "$$LOCAL",
|
|
141
140
|
"webpack": "$$LOCAL",
|
|
141
|
+
"webpack/lib/NormalModule": "../webpack/NormalModule",
|
|
142
142
|
"webpack-5-chain": "$$LOCAL",
|
|
143
143
|
"webpack-sources": "$$LOCAL",
|
|
144
|
-
"ws": "$$LOCAL"
|
|
144
|
+
"ws": "$$LOCAL",
|
|
145
|
+
"css-loader": "css-loader"
|
|
145
146
|
},
|
|
146
147
|
"noMinify": [
|
|
147
148
|
"./bundles/webpack/bundle",
|
|
@@ -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,7 +167,6 @@
|
|
|
167
167
|
"cssnano",
|
|
168
168
|
"compression",
|
|
169
169
|
"connect-history-api-fallback",
|
|
170
|
-
"less",
|
|
171
170
|
"less-loader",
|
|
172
171
|
"mini-css-extract-plugin",
|
|
173
172
|
"postcss-flexbugs-fixes",
|
|
@@ -176,11 +175,20 @@
|
|
|
176
175
|
"sass-loader",
|
|
177
176
|
"speed-measure-webpack-plugin",
|
|
178
177
|
"style-loader",
|
|
179
|
-
"swc-loader",
|
|
180
178
|
"svgo-loader",
|
|
181
179
|
"url-loader",
|
|
180
|
+
"file-loader",
|
|
182
181
|
"webpack-bundle-analyzer",
|
|
183
|
-
"webpack-dev-middleware"
|
|
182
|
+
"webpack-dev-middleware",
|
|
183
|
+
"webpack-manifest-plugin",
|
|
184
|
+
"stylus-loader"
|
|
184
185
|
]
|
|
186
|
+
},
|
|
187
|
+
"scripts": {
|
|
188
|
+
"build": "umi-scripts father build",
|
|
189
|
+
"build:deps": "umi-scripts bundleDeps",
|
|
190
|
+
"dev": "umi-scripts father dev",
|
|
191
|
+
"generate:webpackPackages": "zx ./scripts/generateWebpackPackages.mjs",
|
|
192
|
+
"test": "umi-scripts jest-turbo"
|
|
185
193
|
}
|
|
186
|
-
}
|
|
194
|
+
}
|