Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2962,10 +2962,14 @@ const makeStylWorker = (maxWorkers: number | undefined) => {
{
shouldUseFake(_stylusPath, _content, _root, options) {
// define can include functions and those are not serializable
// in that case, fallback to running in main thread
// Evaluator is always a function
// in those cases, fallback to running in main thread
return !!(
options.define &&
Object.values(options.define).some((d) => typeof d === 'function')
(options.define &&
Object.values(options.define).some(
(d) => typeof d === 'function',
)) ||
options.Evaluator
)
},
max: maxWorkers,
Expand Down
Loading