@modern-js/plugin-module-babel 2.27.0 → 2.29.0
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 +22 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +20 -33
- package/package.json +7 -6
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @modern-js/plugin-module-babel
|
|
2
2
|
|
|
3
|
+
## 2.29.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6993eb6]
|
|
8
|
+
- Updated dependencies [0f680ec]
|
|
9
|
+
- @modern-js/module-tools@2.29.0
|
|
10
|
+
|
|
11
|
+
## 2.28.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- d3e52e4: chore(CI): update build config to improve vitest CI perf
|
|
16
|
+
|
|
17
|
+
chore(CI): 更新构建配置来提升 vitest CI 性能
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [3092f1f]
|
|
20
|
+
- Updated dependencies [118c1c0]
|
|
21
|
+
- Updated dependencies [b7a8c43]
|
|
22
|
+
- Updated dependencies [d3e52e4]
|
|
23
|
+
- @modern-js/module-tools@2.28.0
|
|
24
|
+
|
|
3
25
|
## 2.27.0
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { CliPlugin, ModuleTools } from '@modern-js/module-tools';
|
|
2
2
|
import { babelPlugin } from '@modern-js/libuild-plugin-babel';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export { ModulePluginBabel, Options, ModulePluginBabel as modulePluginBabel };
|
|
3
|
+
export type Options = typeof babelPlugin extends (arg1: infer P) => void ? P : never;
|
|
4
|
+
export declare const ModulePluginBabel: (options?: Options) => CliPlugin<ModuleTools>;
|
|
5
|
+
export { ModulePluginBabel as modulePluginBabel };
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
6
|
for (var name in all)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
ModulePluginBabel: function() {
|
|
14
|
+
return ModulePluginBabel;
|
|
15
|
+
},
|
|
16
|
+
modulePluginBabel: function() {
|
|
17
|
+
return ModulePluginBabel;
|
|
14
18
|
}
|
|
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
|
-
ModulePluginBabel: () => ModulePluginBabel,
|
|
23
|
-
modulePluginBabel: () => ModulePluginBabel
|
|
24
19
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var ModulePluginBabel = (options) => ({
|
|
20
|
+
const _libuildpluginbabel = require("@modern-js/libuild-plugin-babel");
|
|
21
|
+
const ModulePluginBabel = (options) => ({
|
|
28
22
|
name: "babel-plugin",
|
|
29
23
|
setup: () => ({
|
|
30
24
|
modifyLibuild(config) {
|
|
31
|
-
var
|
|
32
|
-
(
|
|
25
|
+
var _config_plugins;
|
|
26
|
+
(_config_plugins = config.plugins) === null || _config_plugins === void 0 ? void 0 : _config_plugins.unshift((0, _libuildpluginbabel.babelPlugin)(options !== null && options !== void 0 ? options : {}));
|
|
33
27
|
return config;
|
|
34
28
|
}
|
|
35
29
|
})
|
|
36
30
|
});
|
|
37
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
-
0 && (module.exports = {
|
|
39
|
-
ModulePluginBabel,
|
|
40
|
-
modulePluginBabel
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -15,23 +15,24 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.29.0",
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@modern-js/libuild-plugin-babel": "0.7.1"
|
|
22
|
+
"@modern-js/libuild-plugin-babel": "0.7.1",
|
|
23
|
+
"@swc/helpers": "0.5.1"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/jest": "^29",
|
|
26
27
|
"@types/node": "^14",
|
|
27
28
|
"typescript": "^5",
|
|
28
29
|
"jest": "^29",
|
|
29
|
-
"@modern-js/module-tools": "2.
|
|
30
|
-
"@scripts/
|
|
31
|
-
"@scripts/
|
|
30
|
+
"@modern-js/module-tools": "2.29.0",
|
|
31
|
+
"@scripts/build": "2.29.0",
|
|
32
|
+
"@scripts/jest-config": "2.29.0"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
|
-
"@modern-js/module-tools": "^2.
|
|
35
|
+
"@modern-js/module-tools": "^2.29.0"
|
|
35
36
|
},
|
|
36
37
|
"sideEffects": false,
|
|
37
38
|
"publishConfig": {
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAA4B;AAOrB,IAAM,oBAAoB,CAC/B,aAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ;AAb1B;AAcM,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\n// deprecated named export\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\n// right named export\nexport { ModulePluginBabel as modulePluginBabel };\n"]}
|