Skip to content

Commit

Permalink
chore: adjust some content
Browse files Browse the repository at this point in the history
  • Loading branch information
10Derozan committed Sep 19, 2023
1 parent 6d7bd63 commit 79bc57b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,9 +1245,9 @@ This optimization is implemented using [babel-plugin-lodash](https://www.npmjs.c
With this configuration, the code will be converted using SWC.

- **Type**: `boolean`
- **Default**: `true`
- **Default**: `false`

When you enable this, Module Tools will automatically redirects the code references of `lodash` to sub-paths.
When you enable this, Modern.js Module will automatically redirects the code references of `lodash` to sub-paths.

For example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default defineConfig({

## use swc

In some scenarios, Esbuild is not enough to meet our needs, then we will use SWC to do the code transformation, mainly in the following scenarios.
In some scenarios, esbuild is not enough to meet our needs, then we will use swc to do the code transformation, mainly in the following scenarios.

- [transformImport](/api/config/build-config#transformimport)
- [transformLodash](/api/config/build-config#transformlodash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ export default defineConfig({
- 类型:`boolean`
- 默认值:`false`

当开启此选项时,Module Tools 会自动将 lodash 的代码引用指向子路径。
当开启此选项时,Modern.js Module 会自动将 lodash 的代码引用指向子路径。

比如:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default defineConfig({

## 使用 swc

在部分场景下,Esbuild 不足以满足我们的需求,此时我们会使用 SWC 来做代码转换,主要有以下几个场景:
在部分场景下,esbuild 不足以满足我们的需求,此时我们会使用 swc 来做代码转换,主要有以下几个场景:

- [transformImport](/api/config/build-config#transformimport)
- [transformLodash](/api/config/build-config#transformlodash)
Expand Down
2 changes: 1 addition & 1 deletion packages/module/plugin-module-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@babel/core": "^7.21.8",
"@babel/core": "^7.22.5",
"@swc/helpers": "0.5.1"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/module/plugin-module-polyfill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@babel/core": "^7.21.8",
"@babel/plugin-syntax-jsx": "7.21.4",
"@babel/plugin-syntax-typescript": "7.21.4",
"@babel/core": "^7.22.5",
"@babel/plugin-syntax-jsx": "7.22.5",
"@babel/plugin-syntax-typescript": "7.22.5",
"@modern-js/plugin-module-babel": "workspace:*",
"babel-plugin-polyfill-corejs3": "0.5.2"
},
Expand Down
50 changes: 17 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 79bc57b

Please sign in to comment.