diff --git a/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md b/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md index 3fd370fdcb1d..37a6a8666c8a 100644 --- a/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md +++ b/packages/document/module-doc/docs/en/guide/advance/in-depth-about-build.md @@ -26,7 +26,7 @@ They have their own benefits. - bundleless maintains the original file structure and is more conducive to debugging and tree shaking. :::warning -bundleless is a single file compilation mode, so for type references and exports you need to add the `type` field, e.g. `import type { A } from '. /types` +bundleless is a single-file compilation mode, so for referencing and exporting types, you need to add the `type` keyword. For example, `import type { A } from './types'`. Please refer to the [esbuild documentation](https://esbuild.github.io/content-types/#isolated-modules) for more information. ::: In `buildConfig` you can specify whether the current build task is bundle or bundleless by using [`buildConfig.buildType`](/en/api/config/build-config#buildtype). diff --git a/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md b/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md index dec341140d1c..2c8fcb51313e 100644 --- a/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md +++ b/packages/document/module-doc/docs/zh/guide/advance/in-depth-about-build.md @@ -26,7 +26,7 @@ sidebar_position: 1 - bundleless 则是可以保持原有的文件结构,更有利于调试和 tree shaking。 :::warning -bundleless 是单文件编译模式,因此对于类型的引用和导出你需要加上 `type` 字段, 例如 `import type { A } from './types` +bundleless 是单文件编译模式,因此对于类型的引用和导出你需要加上 `type` 字段, 例如 `import type { A } from './types`,背景参考 [esbuild 文档](https://esbuild.github.io/content-types/#isolated-modules)。 ::: 在 `buildConfig` 中可以通过 [`buildConfig.buildType`](/api/config/build-config#buildtype) 来指定当前构建任务是 bundle 还是 bundleless。