@umijs/preset-umi 4.0.45 → 4.0.46
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/dist/features/polyfill/polyfill.js +15 -2
- package/package.json +12 -12
|
@@ -29,9 +29,9 @@ __export(polyfill_exports, {
|
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(polyfill_exports);
|
|
31
31
|
var import_core = require("@umijs/bundler-utils/compiled/babel/core");
|
|
32
|
+
var import_constants = require("@umijs/bundler-webpack/dist/constants");
|
|
32
33
|
var import_utils = require("@umijs/utils");
|
|
33
34
|
var import_path = require("path");
|
|
34
|
-
var import_constants = require("@umijs/bundler-webpack/dist/constants");
|
|
35
35
|
var polyfill_default = (api) => {
|
|
36
36
|
api.describe({
|
|
37
37
|
key: "polyfill",
|
|
@@ -80,7 +80,7 @@ export {};
|
|
|
80
80
|
api.writeTmpFile({
|
|
81
81
|
path: "core/polyfill.ts",
|
|
82
82
|
noPluginDir: true,
|
|
83
|
-
content: code
|
|
83
|
+
content: excludeMathPolyfillInQiankun(code)
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
api.addPolyfillImports(() => [{ source: `./core/polyfill` }]);
|
|
@@ -91,6 +91,19 @@ export {};
|
|
|
91
91
|
);
|
|
92
92
|
return memo;
|
|
93
93
|
});
|
|
94
|
+
function excludeMathPolyfillInQiankun(code) {
|
|
95
|
+
if (!api.config.qiankun) {
|
|
96
|
+
return code;
|
|
97
|
+
}
|
|
98
|
+
const EXCLUDE_POLYFILLS = [
|
|
99
|
+
"esnext.math.deg-per-rad",
|
|
100
|
+
"esnext.math.rad-per-deg"
|
|
101
|
+
];
|
|
102
|
+
const lines = code.split("\n");
|
|
103
|
+
return lines.filter((line) => {
|
|
104
|
+
return !EXCLUDE_POLYFILLS.some((i) => line.includes(i));
|
|
105
|
+
}).join("\n");
|
|
106
|
+
}
|
|
94
107
|
};
|
|
95
108
|
// Annotate the CommonJS export names for ESM import in node:
|
|
96
109
|
0 && (module.exports = {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/preset-umi",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.46",
|
|
4
4
|
"description": "@umijs/preset-umi",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/preset-umi#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@iconify/utils": "2.0.9",
|
|
29
29
|
"@svgr/core": "6.2.1",
|
|
30
|
-
"@umijs/ast": "4.0.
|
|
31
|
-
"@umijs/babel-preset-umi": "4.0.
|
|
32
|
-
"@umijs/bundler-utils": "4.0.
|
|
33
|
-
"@umijs/bundler-vite": "4.0.
|
|
34
|
-
"@umijs/bundler-webpack": "4.0.
|
|
35
|
-
"@umijs/core": "4.0.
|
|
30
|
+
"@umijs/ast": "4.0.46",
|
|
31
|
+
"@umijs/babel-preset-umi": "4.0.46",
|
|
32
|
+
"@umijs/bundler-utils": "4.0.46",
|
|
33
|
+
"@umijs/bundler-vite": "4.0.46",
|
|
34
|
+
"@umijs/bundler-webpack": "4.0.46",
|
|
35
|
+
"@umijs/core": "4.0.46",
|
|
36
36
|
"@umijs/did-you-know": "^1.0.0",
|
|
37
37
|
"@umijs/history": "5.3.1",
|
|
38
|
-
"@umijs/mfsu": "4.0.
|
|
39
|
-
"@umijs/plugin-run": "4.0.
|
|
40
|
-
"@umijs/renderer-react": "4.0.
|
|
41
|
-
"@umijs/server": "4.0.
|
|
42
|
-
"@umijs/utils": "4.0.
|
|
38
|
+
"@umijs/mfsu": "4.0.46",
|
|
39
|
+
"@umijs/plugin-run": "4.0.46",
|
|
40
|
+
"@umijs/renderer-react": "4.0.46",
|
|
41
|
+
"@umijs/server": "4.0.46",
|
|
42
|
+
"@umijs/utils": "4.0.46",
|
|
43
43
|
"babel-plugin-dynamic-import-node": "2.3.3",
|
|
44
44
|
"click-to-react-component": "^1.0.8",
|
|
45
45
|
"core-js": "3.27.1",
|