@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CliPlugin, ModuleTools } from '@modern-js/module-tools';
2
2
 
3
- declare const ModulePolyfillPlugin: (options: {
3
+ declare const ModulePolyfillPlugin: (options?: {
4
4
  targets?: Record<string, string> | string;
5
5
  }) => CliPlugin<ModuleTools>;
6
6
 
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;AAAA,UACE,QAAQ,iCAAiC;AAAA,UACzC,EAAE,OAAO,MAAM,KAAK,KAAK;AAAA,QAC3B;AAAA,QACA,CAAC,QAAQ,0BAA0B,CAAC;AAAA,QACpC;AAAA,UACE,QAAQ,+BAA+B;AAAA,UACvC;AAAA,YACE,QAAQ;AAAA,YACR,SAAS,QAAQ;AAAA,UACnB;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 [\n require('@babel/plugin-syntax-typescript'),\n { isTSX: true, dts: true },\n ],\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"]}
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.1",
18
+ "version": "2.21.2-beta.0",
19
19
  "types": "./dist/types/index.d.ts",
20
20
  "main": "./dist/index.js",
21
21
  "devDependencies": {