@umijs/bundler-webpack 4.0.9 → 4.0.10
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/constants.js +1 -1
- package/client/utils/formatWebpackMessages.js +1 -1
- package/dist/build.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/config/_sampleFeature.js +1 -1
- package/dist/config/assetRules.js +1 -1
- package/dist/config/bundleAnalyzerPlugin.js +1 -1
- package/dist/config/compressPlugin.js +3 -2
- package/dist/config/config.js +1 -1
- package/dist/config/copyPlugin.js +1 -1
- package/dist/config/cssRules.js +1 -1
- package/dist/config/definePlugin.js +1 -1
- package/dist/config/detectDeadCode.js +1 -1
- package/dist/config/detectDeadCodePlugin.js +1 -1
- package/dist/config/fastRefreshPlugin.js +1 -1
- package/dist/config/forkTSCheckerPlugin.js +1 -1
- package/dist/config/harmonyLinkingErrorPlugin.js +1 -1
- package/dist/config/ignorePlugin.js +1 -1
- package/dist/config/javaScriptRules.js +1 -1
- package/dist/config/manifestPlugin.js +1 -1
- package/dist/config/miniCSSExtractPlugin.js +1 -1
- package/dist/config/nodePolyfill.js +1 -1
- package/dist/config/nodePrefixPlugin.js +1 -1
- package/dist/config/progressPlugin.js +1 -1
- package/dist/config/purgecssWebpackPlugin.js +1 -1
- package/dist/config/speedMeasureWebpackPlugin.js +1 -1
- package/dist/config/ssrPlugin.js +1 -1
- package/dist/config/svgRules.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/dev.js +10 -6
- package/dist/index.js +1 -1
- package/dist/loader/svgr.js +1 -1
- package/dist/loader/swc.js +1 -1
- package/dist/parcelCSS.js +1 -1
- package/dist/plugins/ProgressPlugin.js +1 -1
- package/dist/plugins/RuntimePublicPathPlugin.js +1 -1
- package/dist/plugins/_SamplePlugin.js +1 -1
- package/dist/requireHook.js +1 -1
- package/dist/schema.js +4 -1
- package/dist/server/server.js +1 -1
- package/dist/server/ws.js +1 -1
- package/dist/swcPlugins/autoCSSModules.js +1 -1
- package/dist/swcPlugins/changeImportFromString.js +1 -1
- package/dist/swcPlugins/lockCoreJS.js +1 -1
- package/dist/types.js +1 -1
- package/dist/utils/browsersList.js +1 -1
- package/dist/utils/depMatch.js +1 -1
- package/dist/utils/formatWebpackMessages.js +1 -1
- package/dist/utils/getEsBuildTarget.d.ts +3 -1
- package/dist/utils/getEsBuildTarget.js +8 -2
- package/package.json +5 -5
package/client/constants.js
CHANGED
package/dist/build.js
CHANGED
|
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
36
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
37
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
|
|
39
|
-
// build.ts
|
|
39
|
+
// src/build.ts
|
|
40
40
|
var build_exports = {};
|
|
41
41
|
__export(build_exports, {
|
|
42
42
|
build: () => build
|
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
};
|
|
15
15
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
16
16
|
|
|
17
|
-
// cli.ts
|
|
17
|
+
// src/cli.ts
|
|
18
18
|
var import_esbuild = __toESM(require("@umijs/bundler-utils/compiled/esbuild"));
|
|
19
19
|
var import_utils = require("@umijs/utils");
|
|
20
20
|
var import_assert = __toESM(require("assert"));
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// _sampleFeature.ts
|
|
19
|
+
// src/config/_sampleFeature.ts
|
|
20
20
|
var sampleFeature_exports = {};
|
|
21
21
|
__export(sampleFeature_exports, {
|
|
22
22
|
addSampleFeature: () => addSampleFeature
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// assetRules.ts
|
|
19
|
+
// src/config/assetRules.ts
|
|
20
20
|
var assetRules_exports = {};
|
|
21
21
|
__export(assetRules_exports, {
|
|
22
22
|
addAssetRules: () => addAssetRules
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// bundleAnalyzerPlugin.ts
|
|
19
|
+
// src/config/bundleAnalyzerPlugin.ts
|
|
20
20
|
var bundleAnalyzerPlugin_exports = {};
|
|
21
21
|
__export(bundleAnalyzerPlugin_exports, {
|
|
22
22
|
addBundleAnalyzerPlugin: () => addBundleAnalyzerPlugin
|
|
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
33
33
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// compressPlugin.ts
|
|
36
|
+
// src/config/compressPlugin.ts
|
|
37
37
|
var compressPlugin_exports = {};
|
|
38
38
|
__export(compressPlugin_exports, {
|
|
39
39
|
addCompressPlugin: () => addCompressPlugin
|
|
@@ -53,7 +53,8 @@ async function addCompressPlugin(opts) {
|
|
|
53
53
|
}
|
|
54
54
|
config.optimization.minimize(true);
|
|
55
55
|
const esbuildTarget = (0, import_getEsBuildTarget.getEsBuildTarget)({
|
|
56
|
-
targets: userConfig.targets || {}
|
|
56
|
+
targets: userConfig.targets || {},
|
|
57
|
+
jsMinifier
|
|
57
58
|
});
|
|
58
59
|
let minify;
|
|
59
60
|
let terserOptions;
|
package/dist/config/config.js
CHANGED
|
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
33
33
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// config.ts
|
|
36
|
+
// src/config/config.ts
|
|
37
37
|
var config_exports = {};
|
|
38
38
|
__export(config_exports, {
|
|
39
39
|
getConfig: () => getConfig
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// copyPlugin.ts
|
|
19
|
+
// src/config/copyPlugin.ts
|
|
20
20
|
var copyPlugin_exports = {};
|
|
21
21
|
__export(copyPlugin_exports, {
|
|
22
22
|
addCopyPlugin: () => addCopyPlugin
|
package/dist/config/cssRules.js
CHANGED
|
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
36
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
37
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
|
|
39
|
-
// cssRules.ts
|
|
39
|
+
// src/config/cssRules.ts
|
|
40
40
|
var cssRules_exports = {};
|
|
41
41
|
__export(cssRules_exports, {
|
|
42
42
|
addCSSRules: () => addCSSRules
|
|
@@ -30,7 +30,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
30
30
|
};
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// definePlugin.ts
|
|
33
|
+
// src/config/definePlugin.ts
|
|
34
34
|
var definePlugin_exports = {};
|
|
35
35
|
__export(definePlugin_exports, {
|
|
36
36
|
addDefinePlugin: () => addDefinePlugin,
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// detectDeadCode.ts
|
|
22
|
+
// src/config/detectDeadCode.ts
|
|
23
23
|
var detectDeadCode_exports = {};
|
|
24
24
|
__export(detectDeadCode_exports, {
|
|
25
25
|
default: () => detectDeadCode_default,
|
|
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
36
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
37
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
|
|
39
|
-
// detectDeadCodePlugin.ts
|
|
39
|
+
// src/config/detectDeadCodePlugin.ts
|
|
40
40
|
var detectDeadCodePlugin_exports = {};
|
|
41
41
|
__export(detectDeadCodePlugin_exports, {
|
|
42
42
|
addDetectDeadCodePlugin: () => addDetectDeadCodePlugin
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// fastRefreshPlugin.ts
|
|
22
|
+
// src/config/fastRefreshPlugin.ts
|
|
23
23
|
var fastRefreshPlugin_exports = {};
|
|
24
24
|
__export(fastRefreshPlugin_exports, {
|
|
25
25
|
addFastRefreshPlugin: () => addFastRefreshPlugin
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// forkTSCheckerPlugin.ts
|
|
22
|
+
// src/config/forkTSCheckerPlugin.ts
|
|
23
23
|
var forkTSCheckerPlugin_exports = {};
|
|
24
24
|
__export(forkTSCheckerPlugin_exports, {
|
|
25
25
|
addForkTSCheckerPlugin: () => addForkTSCheckerPlugin
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// harmonyLinkingErrorPlugin.ts
|
|
19
|
+
// src/config/harmonyLinkingErrorPlugin.ts
|
|
20
20
|
var harmonyLinkingErrorPlugin_exports = {};
|
|
21
21
|
__export(harmonyLinkingErrorPlugin_exports, {
|
|
22
22
|
addHarmonyLinkingErrorPlugin: () => addHarmonyLinkingErrorPlugin
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// ignorePlugin.ts
|
|
19
|
+
// src/config/ignorePlugin.ts
|
|
20
20
|
var ignorePlugin_exports = {};
|
|
21
21
|
__export(ignorePlugin_exports, {
|
|
22
22
|
addIgnorePlugin: () => addIgnorePlugin
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// javaScriptRules.ts
|
|
22
|
+
// src/config/javaScriptRules.ts
|
|
23
23
|
var javaScriptRules_exports = {};
|
|
24
24
|
__export(javaScriptRules_exports, {
|
|
25
25
|
addJavaScriptRules: () => addJavaScriptRules
|
|
@@ -30,7 +30,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
30
30
|
};
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// manifestPlugin.ts
|
|
33
|
+
// src/config/manifestPlugin.ts
|
|
34
34
|
var manifestPlugin_exports = {};
|
|
35
35
|
__export(manifestPlugin_exports, {
|
|
36
36
|
addManifestPlugin: () => addManifestPlugin
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// miniCSSExtractPlugin.ts
|
|
22
|
+
// src/config/miniCSSExtractPlugin.ts
|
|
23
23
|
var miniCSSExtractPlugin_exports = {};
|
|
24
24
|
__export(miniCSSExtractPlugin_exports, {
|
|
25
25
|
addMiniCSSExtractPlugin: () => addMiniCSSExtractPlugin
|
|
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
33
33
|
};
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// nodePolyfill.ts
|
|
36
|
+
// src/config/nodePolyfill.ts
|
|
37
37
|
var nodePolyfill_exports = {};
|
|
38
38
|
__export(nodePolyfill_exports, {
|
|
39
39
|
addNodePolyfill: () => addNodePolyfill
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// nodePrefixPlugin.ts
|
|
19
|
+
// src/config/nodePrefixPlugin.ts
|
|
20
20
|
var nodePrefixPlugin_exports = {};
|
|
21
21
|
__export(nodePrefixPlugin_exports, {
|
|
22
22
|
addNodePrefixPlugin: () => addNodePrefixPlugin
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// progressPlugin.ts
|
|
22
|
+
// src/config/progressPlugin.ts
|
|
23
23
|
var progressPlugin_exports = {};
|
|
24
24
|
__export(progressPlugin_exports, {
|
|
25
25
|
addProgressPlugin: () => addProgressPlugin
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// purgecssWebpackPlugin.ts
|
|
19
|
+
// src/config/purgecssWebpackPlugin.ts
|
|
20
20
|
var purgecssWebpackPlugin_exports = {};
|
|
21
21
|
__export(purgecssWebpackPlugin_exports, {
|
|
22
22
|
applyPurgeCSSWebpackPlugin: () => applyPurgeCSSWebpackPlugin
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// speedMeasureWebpackPlugin.ts
|
|
22
|
+
// src/config/speedMeasureWebpackPlugin.ts
|
|
23
23
|
var speedMeasureWebpackPlugin_exports = {};
|
|
24
24
|
__export(speedMeasureWebpackPlugin_exports, {
|
|
25
25
|
addSpeedMeasureWebpackPlugin: () => addSpeedMeasureWebpackPlugin
|
package/dist/config/ssrPlugin.js
CHANGED
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// ssrPlugin.ts
|
|
19
|
+
// src/config/ssrPlugin.ts
|
|
20
20
|
var ssrPlugin_exports = {};
|
|
21
21
|
__export(ssrPlugin_exports, {
|
|
22
22
|
default: () => addSSRPlugin
|
package/dist/config/svgRules.js
CHANGED
|
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
36
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
37
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
|
|
39
|
-
// svgRules.ts
|
|
39
|
+
// src/config/svgRules.ts
|
|
40
40
|
var svgRules_exports = {};
|
|
41
41
|
__export(svgRules_exports, {
|
|
42
42
|
addSVGRules: () => addSVGRules
|
package/dist/constants.js
CHANGED
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// constants.ts
|
|
19
|
+
// src/constants.ts
|
|
20
20
|
var constants_exports = {};
|
|
21
21
|
__export(constants_exports, {
|
|
22
22
|
DEFAULT_BROWSER_TARGETS: () => DEFAULT_BROWSER_TARGETS,
|
package/dist/dev.js
CHANGED
|
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
36
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
37
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
|
|
39
|
-
// dev.ts
|
|
39
|
+
// src/dev.ts
|
|
40
40
|
var dev_exports = {};
|
|
41
41
|
__export(dev_exports, {
|
|
42
42
|
dev: () => dev,
|
|
@@ -61,7 +61,7 @@ function stripUndefined(obj) {
|
|
|
61
61
|
return obj;
|
|
62
62
|
}
|
|
63
63
|
async function dev(opts) {
|
|
64
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
65
65
|
const cacheDirectoryPath = (0, import_path.resolve)(opts.rootDir || opts.cwd, opts.config.cacheDirectoryPath || "node_modules/.cache");
|
|
66
66
|
const enableMFSU = opts.config.mfsu !== false;
|
|
67
67
|
let mfsu = null;
|
|
@@ -83,6 +83,9 @@ async function dev(opts) {
|
|
|
83
83
|
tmpBase: ((_d = opts.config.mfsu) == null ? void 0 : _d.cacheDirectory) || (0, import_path.join)(cacheDirectoryPath, "mfsu"),
|
|
84
84
|
onMFSUProgress: opts.onMFSUProgress,
|
|
85
85
|
unMatchLibs: (_e = opts.config.mfsu) == null ? void 0 : _e.exclude,
|
|
86
|
+
shared: (_f = opts.config.mfsu) == null ? void 0 : _f.shared,
|
|
87
|
+
remoteAliases: (_g = opts.config.mfsu) == null ? void 0 : _g.remoteAliases,
|
|
88
|
+
remoteName: (_h = opts.config.mfsu) == null ? void 0 : _h.remoteName,
|
|
86
89
|
getCacheDependency() {
|
|
87
90
|
return stripUndefined({
|
|
88
91
|
version: require("../package.json").version,
|
|
@@ -93,7 +96,8 @@ async function dev(opts) {
|
|
|
93
96
|
runtimePublicPath: opts.config.runtimePublicPath,
|
|
94
97
|
publicPath: opts.config.publicPath
|
|
95
98
|
});
|
|
96
|
-
}
|
|
99
|
+
},
|
|
100
|
+
serverBase: `${opts.config.https ? "https" : "http"}://${opts.host}:${opts.port || 8e3}`
|
|
97
101
|
});
|
|
98
102
|
}
|
|
99
103
|
const webpackConfig = await (0, import_config.getConfig)({
|
|
@@ -132,14 +136,14 @@ async function dev(opts) {
|
|
|
132
136
|
hash: true,
|
|
133
137
|
staticPathPrefix: import_mfsu.MF_DEP_PREFIX,
|
|
134
138
|
name: import_constants.MFSU_NAME,
|
|
135
|
-
chainWebpack: (
|
|
139
|
+
chainWebpack: (_i = opts.config.mfsu) == null ? void 0 : _i.chainWebpack,
|
|
136
140
|
cache: {
|
|
137
|
-
buildDependencies: (
|
|
141
|
+
buildDependencies: (_j = opts.cache) == null ? void 0 : _j.buildDependencies,
|
|
138
142
|
cacheDirectory: (0, import_path.join)(cacheDirectoryPath, "mfsu-deps")
|
|
139
143
|
},
|
|
140
144
|
pkg: opts.pkg
|
|
141
145
|
});
|
|
142
|
-
(
|
|
146
|
+
(_k = webpackConfig.resolve).alias || (_k.alias = {});
|
|
143
147
|
["@umijs/utils/compiled/strip-ansi", "react-error-overlay"].forEach((dep) => {
|
|
144
148
|
webpackConfig.resolve.alias[dep] = require.resolve(dep);
|
|
145
149
|
});
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
13
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
15
|
|
|
16
|
-
// index.ts
|
|
16
|
+
// src/index.ts
|
|
17
17
|
var src_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(src_exports);
|
|
19
19
|
var import_requireHook = require("./requireHook");
|
package/dist/loader/svgr.js
CHANGED
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// svgr.ts
|
|
22
|
+
// src/loader/svgr.ts
|
|
23
23
|
var svgr_exports = {};
|
|
24
24
|
__export(svgr_exports, {
|
|
25
25
|
default: () => svgr_default
|
package/dist/loader/swc.js
CHANGED
|
@@ -45,7 +45,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
45
45
|
};
|
|
46
46
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
47
47
|
|
|
48
|
-
// swc.ts
|
|
48
|
+
// src/loader/swc.ts
|
|
49
49
|
var swc_exports = {};
|
|
50
50
|
__export(swc_exports, {
|
|
51
51
|
default: () => swc_default
|
package/dist/parcelCSS.js
CHANGED
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// parcelCSS.ts
|
|
22
|
+
// src/parcelCSS.ts
|
|
23
23
|
var parcelCSS_exports = {};
|
|
24
24
|
__export(parcelCSS_exports, {
|
|
25
25
|
parcelCSS: () => parcelCSS
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// ProgressPlugin.ts
|
|
19
|
+
// src/plugins/ProgressPlugin.ts
|
|
20
20
|
var ProgressPlugin_exports = {};
|
|
21
21
|
__export(ProgressPlugin_exports, {
|
|
22
22
|
default: () => ProgressPlugin_default
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// RuntimePublicPathPlugin.ts
|
|
19
|
+
// src/plugins/RuntimePublicPathPlugin.ts
|
|
20
20
|
var RuntimePublicPathPlugin_exports = {};
|
|
21
21
|
__export(RuntimePublicPathPlugin_exports, {
|
|
22
22
|
RuntimePublicPathPlugin: () => RuntimePublicPathPlugin
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// _SamplePlugin.ts
|
|
19
|
+
// src/plugins/_SamplePlugin.ts
|
|
20
20
|
var SamplePlugin_exports = {};
|
|
21
21
|
__export(SamplePlugin_exports, {
|
|
22
22
|
default: () => SamplePlugin_default
|
package/dist/requireHook.js
CHANGED
|
@@ -14,7 +14,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
};
|
|
15
15
|
var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target, mod2));
|
|
16
16
|
|
|
17
|
-
// requireHook.ts
|
|
17
|
+
// src/requireHook.ts
|
|
18
18
|
var import_deepImports = __toESM(require("@umijs/bundler-webpack/compiled/webpack/deepImports.json"));
|
|
19
19
|
var import_path = require("path");
|
|
20
20
|
var PKG_ROOT = (0, import_path.join)(__dirname, "../");
|
package/dist/schema.js
CHANGED
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// schema.ts
|
|
19
|
+
// src/schema.ts
|
|
20
20
|
var schema_exports = {};
|
|
21
21
|
__export(schema_exports, {
|
|
22
22
|
getSchemas: () => getSchemas
|
|
@@ -98,7 +98,10 @@ function getSchemas() {
|
|
|
98
98
|
exclude: Joi.array().items(Joi.alternatives().try(Joi.string(), Joi.object().regex())),
|
|
99
99
|
include: Joi.array().items(Joi.string()),
|
|
100
100
|
mfName: Joi.string(),
|
|
101
|
+
remoteAliases: Joi.array().items(Joi.string()),
|
|
102
|
+
remoteName: Joi.string(),
|
|
101
103
|
runtimePublicPath: Joi.boolean(),
|
|
104
|
+
shared: Joi.object(),
|
|
102
105
|
strategy: Joi.string().valid("eager", "normal").default("normal")
|
|
103
106
|
}), Joi.boolean()),
|
|
104
107
|
outputPath: (Joi) => Joi.string(),
|
package/dist/server/server.js
CHANGED
|
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
36
36
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
37
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
|
|
39
|
-
// server.ts
|
|
39
|
+
// src/server/server.ts
|
|
40
40
|
var server_exports = {};
|
|
41
41
|
__export(server_exports, {
|
|
42
42
|
createServer: () => createServer
|
package/dist/server/ws.js
CHANGED
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// ws.ts
|
|
22
|
+
// src/server/ws.ts
|
|
23
23
|
var ws_exports = {};
|
|
24
24
|
__export(ws_exports, {
|
|
25
25
|
createWebSocketServer: () => createWebSocketServer
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// autoCSSModules.ts
|
|
22
|
+
// src/swcPlugins/autoCSSModules.ts
|
|
23
23
|
var autoCSSModules_exports = {};
|
|
24
24
|
__export(autoCSSModules_exports, {
|
|
25
25
|
default: () => autoCSSModules_default
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// changeImportFromString.ts
|
|
19
|
+
// src/swcPlugins/changeImportFromString.ts
|
|
20
20
|
var changeImportFromString_exports = {};
|
|
21
21
|
__export(changeImportFromString_exports, {
|
|
22
22
|
changeImportFromString: () => changeImportFromString
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// lockCoreJS.ts
|
|
22
|
+
// src/swcPlugins/lockCoreJS.ts
|
|
23
23
|
var lockCoreJS_exports = {};
|
|
24
24
|
__export(lockCoreJS_exports, {
|
|
25
25
|
default: () => lockCoreJS_default
|
package/dist/types.js
CHANGED
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// types.ts
|
|
19
|
+
// src/types.ts
|
|
20
20
|
var types_exports = {};
|
|
21
21
|
__export(types_exports, {
|
|
22
22
|
CSSMinifier: () => CSSMinifier,
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// browsersList.ts
|
|
19
|
+
// src/utils/browsersList.ts
|
|
20
20
|
var browsersList_exports = {};
|
|
21
21
|
__export(browsersList_exports, {
|
|
22
22
|
getBrowsersList: () => getBrowsersList
|
package/dist/utils/depMatch.js
CHANGED
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// depMatch.ts
|
|
19
|
+
// src/utils/depMatch.ts
|
|
20
20
|
var depMatch_exports = {};
|
|
21
21
|
__export(depMatch_exports, {
|
|
22
22
|
cleanCache: () => cleanCache,
|
|
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
-
// formatWebpackMessages.ts
|
|
22
|
+
// src/utils/formatWebpackMessages.ts
|
|
23
23
|
var formatWebpackMessages_exports = {};
|
|
24
24
|
__export(formatWebpackMessages_exports, {
|
|
25
25
|
formatMessage: () => formatMessage,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { JSMinifier } from '../types';
|
|
1
2
|
interface IOpts {
|
|
2
3
|
targets: Record<string, any>;
|
|
4
|
+
jsMinifier: `${JSMinifier}`;
|
|
3
5
|
}
|
|
4
|
-
export declare function getEsBuildTarget({ targets }: IOpts): string[];
|
|
6
|
+
export declare function getEsBuildTarget({ targets, jsMinifier }: IOpts): string[];
|
|
5
7
|
export {};
|
|
@@ -16,14 +16,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// getEsBuildTarget.ts
|
|
19
|
+
// src/utils/getEsBuildTarget.ts
|
|
20
20
|
var getEsBuildTarget_exports = {};
|
|
21
21
|
__export(getEsBuildTarget_exports, {
|
|
22
22
|
getEsBuildTarget: () => getEsBuildTarget
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(getEsBuildTarget_exports);
|
|
25
|
+
var import_utils = require("@umijs/utils");
|
|
25
26
|
var import_constants = require("../constants");
|
|
26
|
-
|
|
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(`${import_utils.chalk.red(`jsMinifier: esbuild`)} is not supported when there is ie in the targets, you can use ${import_utils.chalk.green(`jsMinifier: 'terser'`)}`);
|
|
31
|
+
throw new Error("IE is not supported");
|
|
32
|
+
}
|
|
27
33
|
return Object.keys(targets).filter((key) => import_constants.DEFAULT_ESBUILD_TARGET_KEYS.includes(key)).map((key) => {
|
|
28
34
|
return `${key}${targets[key] === true ? "0" : targets[key]}`;
|
|
29
35
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-webpack",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.10",
|
|
4
4
|
"description": "@umijs/bundler-webpack",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-webpack#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"@svgr/plugin-jsx": "^6.2.1",
|
|
35
35
|
"@svgr/plugin-svgo": "^6.2.0",
|
|
36
36
|
"@types/hapi__joi": "17.1.8",
|
|
37
|
-
"@umijs/babel-preset-umi": "4.0.
|
|
38
|
-
"@umijs/bundler-utils": "4.0.
|
|
37
|
+
"@umijs/babel-preset-umi": "4.0.10",
|
|
38
|
+
"@umijs/bundler-utils": "4.0.10",
|
|
39
39
|
"@umijs/case-sensitive-paths-webpack-plugin": "^1.0.1",
|
|
40
|
-
"@umijs/mfsu": "4.0.
|
|
41
|
-
"@umijs/utils": "4.0.
|
|
40
|
+
"@umijs/mfsu": "4.0.10",
|
|
41
|
+
"@umijs/utils": "4.0.10",
|
|
42
42
|
"cors": "^2.8.5",
|
|
43
43
|
"css-loader": "6.7.1",
|
|
44
44
|
"es5-imcompatible-versions": "^0.1.73",
|