@modern-js/plugin-module-babel 2.0.0-beta.6 → 2.0.0-beta.7
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/index.d.ts +2 -5
- package/dist/index.js +2 -7
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { CliPlugin, ModuleTools } from '@modern-js/module-tools';
|
|
2
|
-
import {
|
|
2
|
+
import { babelPlugin } from '@modern-js/libuild-plugin-babel';
|
|
3
3
|
|
|
4
|
-
declare type Options = typeof
|
|
5
|
-
internalPresetOptions?: P1;
|
|
6
|
-
babelTransformOptions?: P2;
|
|
7
|
-
} : never;
|
|
4
|
+
declare type Options = typeof babelPlugin extends (arg1: infer P) => void ? P : never;
|
|
8
5
|
declare const ModulePluginBabel: (options?: Options) => CliPlugin<ModuleTools>;
|
|
9
6
|
|
|
10
7
|
export { ModulePluginBabel, Options };
|
package/dist/index.js
CHANGED
|
@@ -22,18 +22,13 @@ __export(src_exports, {
|
|
|
22
22
|
ModulePluginBabel: () => ModulePluginBabel
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(src_exports);
|
|
25
|
-
var
|
|
25
|
+
var import_libuild_plugin_babel = require("@modern-js/libuild-plugin-babel");
|
|
26
26
|
var ModulePluginBabel = (options) => ({
|
|
27
27
|
name: "babel-plugin",
|
|
28
28
|
setup: () => ({
|
|
29
29
|
modifyLibuild(config) {
|
|
30
30
|
var _a;
|
|
31
|
-
(_a = config.plugins) == null ? void 0 : _a.unshift(
|
|
32
|
-
(0, import_libuild_plugin_babel_preset.babelPresetPlugin)(
|
|
33
|
-
options == null ? void 0 : options.internalPresetOptions,
|
|
34
|
-
options == null ? void 0 : options.babelTransformOptions
|
|
35
|
-
)
|
|
36
|
-
);
|
|
31
|
+
(_a = config.plugins) == null ? void 0 : _a.unshift((0, import_libuild_plugin_babel.babelPlugin)(options != null ? options : {}));
|
|
37
32
|
return config;
|
|
38
33
|
}
|
|
39
34
|
})
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAA4B;AAMrB,IAAM,oBAAoB,CAC/B,aAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ;AAZ1B;AAaM,mBAAO,YAAP,mBAAgB,YAAQ,yCAAY,4BAAW,CAAC,CAAC;AACjD,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { CliPlugin, ModuleTools } from '@modern-js/module-tools';\nimport { babelPlugin } from '@modern-js/libuild-plugin-babel';\n\nexport type Options = typeof babelPlugin extends (arg1: infer P) => void\n ? P\n : never;\n\nexport const ModulePluginBabel = (\n options?: Options,\n): CliPlugin<ModuleTools> => ({\n name: 'babel-plugin',\n setup: () => ({\n modifyLibuild(config) {\n config.plugins?.unshift(babelPlugin(options ?? {}));\n return config;\n },\n }),\n});\n"]}
|
package/package.json
CHANGED
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.0.0-beta.
|
|
14
|
+
"version": "2.0.0-beta.7",
|
|
15
15
|
"types": "./dist/types/index.d.ts",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@modern-js/libuild-plugin-babel
|
|
18
|
+
"@modern-js/libuild-plugin-babel": "0.7.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/jest": "^27",
|
|
22
22
|
"@types/node": "^14",
|
|
23
23
|
"typescript": "^4",
|
|
24
24
|
"jest": "^27",
|
|
25
|
-
"@
|
|
26
|
-
"@scripts/
|
|
27
|
-
"@
|
|
25
|
+
"@scripts/jest-config": "2.0.0-beta.7",
|
|
26
|
+
"@scripts/build": "2.0.0-beta.7",
|
|
27
|
+
"@modern-js/module-tools": "2.0.0-beta.7"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@modern-js/module-tools": "2.0.0-beta.
|
|
30
|
+
"@modern-js/module-tools": "2.0.0-beta.7"
|
|
31
31
|
},
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"publishConfig": {
|