@modern-js/plugin-module-polyfill 2.21.0 → 2.21.2-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -29,16 +29,13 @@ var ModulePolyfillPlugin = (options) => ({
|
|
29
29
|
modifyLibuild(config) {
|
30
30
|
var _a;
|
31
31
|
const plugins = [
|
32
|
-
[
|
33
|
-
require("@babel/plugin-syntax-typescript"),
|
34
|
-
{ isTSX: true, dts: true }
|
35
|
-
],
|
32
|
+
[require("@babel/plugin-syntax-typescript"), { isTSX: true }],
|
36
33
|
[require("@babel/plugin-syntax-jsx")],
|
37
34
|
[
|
38
35
|
require("babel-plugin-polyfill-corejs3"),
|
39
36
|
{
|
40
37
|
method: "usage-pure",
|
41
|
-
targets: options.targets
|
38
|
+
targets: options == null ? void 0 : options.targets
|
42
39
|
}
|
43
40
|
]
|
44
41
|
];
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAA4B;AAErB,IAAM,uBAAuB,CAAC,aAEN;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ;AAR1B;AASM,YAAM,UAAU;AAAA,QACd
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAA4B;AAErB,IAAM,uBAAuB,CAAC,aAEN;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ;AAR1B;AASM,YAAM,UAAU;AAAA,QACd,CAAC,QAAQ,iCAAiC,GAAG,EAAE,OAAO,KAAK,CAAC;AAAA,QAC5D,CAAC,QAAQ,0BAA0B,CAAC;AAAA,QACpC;AAAA,UACE,QAAQ,+BAA+B;AAAA,UACvC;AAAA,YACE,QAAQ;AAAA,YACR,SAAS,mCAAS;AAAA,UACpB;AAAA,QACF;AAAA,MACF;AACA,mBAAO,YAAP,mBAAgB;AAAA,YACd,yCAAY;AAAA,UACV;AAAA,QACF,CAAC;AAAA;AAEH,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';\nimport { babelPlugin } from '@modern-js/libuild-plugin-babel';\n\nexport const ModulePolyfillPlugin = (options?: {\n targets?: Record<string, string> | string;\n}): CliPlugin<ModuleTools> => ({\n name: '@modern-js/plugin-module-polyfill',\n setup: () => ({\n modifyLibuild(config) {\n const plugins = [\n [require('@babel/plugin-syntax-typescript'), { isTSX: true }],\n [require('@babel/plugin-syntax-jsx')],\n [\n require('babel-plugin-polyfill-corejs3'),\n {\n method: 'usage-pure',\n targets: options?.targets,\n },\n ],\n ];\n config.plugins?.push(\n babelPlugin({\n plugins,\n }),\n );\n return config;\n },\n }),\n});\n"]}
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.21.0",
|
18
|
+
"version": "2.21.2-beta.0",
|
19
19
|
"types": "./dist/types/index.d.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"devDependencies": {
|
@@ -23,12 +23,12 @@
|
|
23
23
|
"@types/node": "^14",
|
24
24
|
"typescript": "^5",
|
25
25
|
"jest": "^29",
|
26
|
-
"@scripts/build": "2.21.
|
27
|
-
"@scripts/jest-config": "2.21.
|
28
|
-
"@modern-js/module-tools": "2.21.
|
26
|
+
"@scripts/build": "2.21.1",
|
27
|
+
"@scripts/jest-config": "2.21.1",
|
28
|
+
"@modern-js/module-tools": "2.21.1"
|
29
29
|
},
|
30
30
|
"peerDependencies": {
|
31
|
-
"@modern-js/module-tools": "^2.21.
|
31
|
+
"@modern-js/module-tools": "^2.21.1",
|
32
32
|
"core-js-pure": "^3.25.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|