@modern-js/plugin-module-babel 2.3.0 → 2.5.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/README.md +25 -13
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
# @modern-js/plugin-module-babel
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The babel plugin of Modern.js Module Tools.
|
|
4
|
+
|
|
5
|
+
You can add babel compile by the plugin before module-tools internal building.
|
|
4
6
|
|
|
5
7
|
## Usage
|
|
6
8
|
|
|
7
|
-
```
|
|
9
|
+
```ts
|
|
8
10
|
import { defineConfig } from '@modern-js/module-tools';
|
|
9
11
|
import { ModulePluginBabel } from '@modern-js/plugin-module-main-fields';
|
|
10
12
|
export default defineConfig({
|
|
11
|
-
plugins: [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
plugins: [
|
|
14
|
+
ModulePluginBabel({
|
|
15
|
+
internalPresetOptions: {
|
|
16
|
+
// babel-plugin-import options
|
|
17
|
+
import: {},
|
|
18
|
+
// @babel/preset-react options
|
|
19
|
+
react: {},
|
|
20
|
+
},
|
|
21
|
+
// refer: https://babeljs.io/docs/en/options
|
|
22
|
+
babelTransformOptions: {},
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
21
25
|
});
|
|
22
26
|
```
|
|
23
27
|
|
|
28
|
+
## Documentation
|
|
29
|
+
|
|
30
|
+
- [English Documentation](https://modernjs.dev/module-tools/en)
|
|
31
|
+
- [中文文档](https://modernjs.dev/module-tools/)
|
|
24
32
|
|
|
25
33
|
## Contributing
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
Please read the [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
Modern.js is [MIT licensed](https://github.com/modern-js-dev/modern.js/blob/main/LICENSE).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/plugin-module-babel",
|
|
3
|
-
"description": "The
|
|
4
|
-
"homepage": "https://modernjs.dev",
|
|
3
|
+
"description": "The babel plugin of Modern.js Module Tools.",
|
|
4
|
+
"homepage": "https://modernjs.dev/module-tools",
|
|
5
5
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
6
6
|
"repository": "modern-js-dev/modern.js",
|
|
7
7
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.5.0",
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"dependencies": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"@types/node": "^14",
|
|
23
23
|
"typescript": "^4",
|
|
24
24
|
"jest": "^27",
|
|
25
|
-
"@
|
|
26
|
-
"@scripts/
|
|
27
|
-
"@
|
|
25
|
+
"@modern-js/module-tools": "2.5.0",
|
|
26
|
+
"@scripts/build": "2.5.0",
|
|
27
|
+
"@scripts/jest-config": "2.5.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@modern-js/module-tools": "^2.
|
|
30
|
+
"@modern-js/module-tools": "^2.5.0"
|
|
31
31
|
},
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"publishConfig": {
|