@modern-js/plugin-module-polyfill 2.21.1 → 2.21.2-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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"]}
|