@modern-js/plugin-module-node-polyfill 0.0.0-next-1690354890697 → 0.0.0-next-1690363886836
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/CHANGELOG.md +2 -8
- package/dist/index.d.ts +6 -3
- package/dist/index.js +33 -13
- package/dist/index.js.map +1 -0
- package/package.json +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
# @modern-js/plugin-module-node-polyfill
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1690363886836
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
chore(CI): 更新构建配置来提升 vitest CI 性能
|
|
10
|
-
|
|
11
|
-
- Updated dependencies [3092f1fc9c]
|
|
12
|
-
- Updated dependencies [d3e52e4f69]
|
|
13
|
-
- @modern-js/module-tools@0.0.0-next-1690354890697
|
|
7
|
+
- @modern-js/module-tools@0.0.0-next-1690363886836
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { CliPlugin, ModuleTools } from '@modern-js/module-tools';
|
|
2
|
+
import { NodePolyfillPluginOptions } from '@modern-js/libuild-plugin-node-polyfill';
|
|
3
|
+
|
|
4
|
+
declare const modulePluginNodePolyfill: (polyfillOption?: NodePolyfillPluginOptions) => CliPlugin<ModuleTools>;
|
|
5
|
+
|
|
6
|
+
export { modulePluginNodePolyfill };
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 });
|
|
9
14
|
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/index.ts
|
|
20
|
+
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
22
|
+
modulePluginNodePolyfill: () => modulePluginNodePolyfill
|
|
10
23
|
});
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
module.exports = __toCommonJS(src_exports);
|
|
25
|
+
var import_libuild_plugin_node_polyfill = require("@modern-js/libuild-plugin-node-polyfill");
|
|
26
|
+
var modulePluginNodePolyfill = (polyfillOption = {}) => ({
|
|
13
27
|
name: "polyfill-plugin",
|
|
14
28
|
setup() {
|
|
15
29
|
return {
|
|
16
30
|
modifyLibuild(config, next) {
|
|
17
|
-
var
|
|
31
|
+
var _a;
|
|
18
32
|
config.plugins = [
|
|
19
|
-
...(
|
|
20
|
-
(0,
|
|
33
|
+
...(_a = config.plugins) != null ? _a : [],
|
|
34
|
+
(0, import_libuild_plugin_node_polyfill.nodePolyfillPlugin)(polyfillOption)
|
|
21
35
|
];
|
|
22
36
|
return next(config);
|
|
23
37
|
}
|
|
24
38
|
};
|
|
25
39
|
}
|
|
26
40
|
});
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
modulePluginNodePolyfill
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0CAAmC;AAE5B,IAAM,2BAA2B,CACtC,iBAA4C,CAAC,OACjB;AAAA,EAC5B,MAAM;AAAA,EACN,QAAQ;AACN,WAAO;AAAA,MACL,cAAc,QAAQ,MAAM;AAVlC;AAWQ,eAAO,UAAU;AAAA,UACf,IAAI,YAAO,YAAP,YAAkB,CAAC;AAAA,cACvB,wDAAmB,cAAc;AAAA,QACnC;AACA,eAAO,KAAK,MAAM;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AACF;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';\nimport type { NodePolyfillPluginOptions } from '@modern-js/libuild-plugin-node-polyfill';\nimport { nodePolyfillPlugin } from '@modern-js/libuild-plugin-node-polyfill';\n\nexport const modulePluginNodePolyfill = (\n polyfillOption: NodePolyfillPluginOptions = {},\n): CliPlugin<ModuleTools> => ({\n name: 'polyfill-plugin',\n setup() {\n return {\n modifyLibuild(config, next) {\n config.plugins = [\n ...(config.plugins ?? []),\n nodePolyfillPlugin(polyfillOption),\n ];\n return next(config);\n },\n };\n },\n});\n"]}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-1690363886836",
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"devDependencies": {
|
|
@@ -23,13 +23,12 @@
|
|
|
23
23
|
"@types/node": "^14",
|
|
24
24
|
"typescript": "^5",
|
|
25
25
|
"jest": "^29",
|
|
26
|
-
"@
|
|
27
|
-
"@scripts/
|
|
28
|
-
"@
|
|
29
|
-
"@modern-js/module-tools": "0.0.0-next-1690354890697"
|
|
26
|
+
"@scripts/build": "0.0.0-next-1690363886836",
|
|
27
|
+
"@scripts/jest-config": "0.0.0-next-1690363886836",
|
|
28
|
+
"@modern-js/module-tools": "0.0.0-next-1690363886836"
|
|
30
29
|
},
|
|
31
30
|
"peerDependencies": {
|
|
32
|
-
"@modern-js/module-tools": "0.0.0-next-
|
|
31
|
+
"@modern-js/module-tools": "0.0.0-next-1690363886836"
|
|
33
32
|
},
|
|
34
33
|
"peerDependenciesMeta": {
|
|
35
34
|
"@modern-js/module-tools": {
|