We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6c295e0 + 9bc72a2 commit a9473eaCopy full SHA for a9473ea
1 file changed
config/shared-options.md
@@ -278,11 +278,12 @@ export default defineConfig({
278
279
## css.preprocessorMaxWorkers
280
281
-- **实验性:** [提供反馈](https://github.com/vitejs/vite/discussions/15835)
282
- **类型:** `number | true`
283
-- **默认:** `0`(不会创建任何 worker 线程,而是在主线程中运行)
+- **默认:** `true`
+
284
+指定 CSS 预处理器可以使用的最大线程数。`true` 表示最多为 CPU 数量减 1。当设置为 `0` 时,Vite 将不会创建任何工作线程,而是在主线程中运行预处理器。
285
-如果启用了这个选项,那么 CSS 预处理器会尽可能在 worker 线程中运行。`true` 表示 CPU 数量减 1。
286
+根据预处理器选项,即使此选项未设置为 `0`,Vite 也可能会在主线程上运行预处理器。
287
288
## css.devSourcemap {#css-devsourcemap}
289
0 commit comments