Skip to content

Commit

Permalink
docs: faq
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Dec 27, 2024
1 parent 97dc1f2 commit 8f4f91b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions website/docs/en/guide/faq/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bundleless means that each source file is compiled and built separately, which c

1. Set `source.entry` to remove `.less/.scss` files from the entry.
2. Set `output.copy` to copy `.less/.scss` files to the output directory.
3. Set `redirect.style` to `false` to disable the redirect behavior for the import path of `.less/.scss` files.
3. Set `redirect.style.extension` to `false` to disable the redirect behavior for the import path of `.less/.scss` files.

Below is an example of skipping the `.scss` file processing. All `.scss` files in `src` will be copied to the output directory and retained with consistent relative paths.

Expand All @@ -26,7 +26,9 @@ export default defineConfig({
copy: [{ from: '**/*.scss', context: path.join(__dirname, 'src') }],
},
redirect: {
style: false,
style: {
extension: false,
},
},
},
],
Expand Down
6 changes: 4 additions & 2 deletions website/docs/zh/guide/faq/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bundleless 是指对每个源文件单独进行编译构建,可以理解为仅

1. 设置 `source.entry``.less/.scss` 文件从入口里移除。
2. 设置 `output.copy``.less/.scss` 文件拷贝到产物目录。
3. 设置 `redirect.style``false` 禁用对 `.less/.scss` 文件导入路径的重定向行为。
3. 设置 `redirect.style.extension``false` 禁用对 `.less/.scss` 文件导入路径的重定向行为。

下面是一个跳过 `.scss` 文件处理的例子,`src` 里面所有的 `.scss` 文件都会被拷贝到产物目录下并且保留一致的相对路径。

Expand All @@ -26,7 +26,9 @@ export default defineConfig({
copy: [{ from: '**/*.scss', context: path.join(__dirname, 'src') }],
},
redirect: {
style: false,
style: {
extension: false,
}
},
},
],
Expand Down

0 comments on commit 8f4f91b

Please sign in to comment.