Skip to content

Commit

Permalink
fix(css): fallback to mainthread if logger or pkgImporter option is s…
Browse files Browse the repository at this point in the history
…et for sass (#18071)
  • Loading branch information
sapphi-red authored Sep 10, 2024
1 parent abf04c3 commit d81dc59
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,10 @@ const makeScssWorker = (
return !!(
(options.functions && Object.keys(options.functions).length > 0) ||
(options.importer &&
(!Array.isArray(options.importer) || options.importer.length > 0))
(!Array.isArray(options.importer) ||
options.importer.length > 0)) ||
options.logger ||
options.pkgImporter
)
},
max: maxWorkers,
Expand Down Expand Up @@ -2324,7 +2327,9 @@ const makeModernScssWorker = (
return !!(
(options.functions && Object.keys(options.functions).length > 0) ||
(options.importers &&
(!Array.isArray(options.importers) || options.importers.length > 0))
(!Array.isArray(options.importers) ||
options.importers.length > 0)) ||
options.logger
)
},
max: maxWorkers,
Expand Down

0 comments on commit d81dc59

Please sign in to comment.