Skip to content

Commit

Permalink
refactor: downgrade browser targets for esbuild transformer (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript authored Aug 8, 2023
1 parent 08f592c commit 4621887
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ father 支持以下配置项。

指定构建产物的目标平台,其中 `esm``umd` 产物的默认 `platform``browser``cjs` 产物的默认 `platform``node`;指定为 `browser` 时产物默认兼容至 IE11,指定为 `node` 时产物默认兼容至 Node.js v14。

> 注:Bundless 模式下,如果手动将 `transformer` 指定为 `esbuild`,那么 `browser` 产物默认兼容性为 Chrome65 而不是 IE11。
> 注:Bundless 模式下,如果手动将 `transformer` 指定为 `esbuild`,那么 `browser` 产物默认兼容性为 Chrome51 而不是 IE11。
### sourcemap

Expand All @@ -71,7 +71,7 @@ father 支持以下配置项。
| `platform` | `transformer` | default value |
| ---------- | ------------- | ---------------- |
| `browser` | `babel` | `{ ie: 11 }` |
| `browser` | `esbuild` | `{ chrome: 65 }` |
| `browser` | `esbuild` | `{ chrome: 51 }` |
| `browser` | `swc` | `{ ie: 11 }` |
| `node` | `babel` | `{ node: 14 }` |
| `node` | `esbuild` | `{ node: 14 }` |
Expand Down
2 changes: 1 addition & 1 deletion src/builder/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const defaultCompileTarget: Record<
> = {
[IFatherPlatformTypes.BROWSER]: {
[IFatherJSTransformerTypes.BABEL]: { ie: 11 },
[IFatherJSTransformerTypes.ESBUILD]: ['chrome65'],
[IFatherJSTransformerTypes.ESBUILD]: ['chrome51'],
[IFatherJSTransformerTypes.SWC]: { ie: 11 },
},
[IFatherPlatformTypes.NODE]: {
Expand Down

0 comments on commit 4621887

Please sign in to comment.