Skip to content

Commit ea5f6fc

Browse files
authoredApr 9, 2023
fix(worker): return null for shouldTransformCachedModule (#12797)
1 parent 46bdf7d commit ea5f6fc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎packages/vite/src/node/plugins/reporter.ts

+4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin {
9191
startTime = Date.now()
9292
},
9393

94+
buildStart() {
95+
transformedCount = 0
96+
},
97+
9498
buildEnd() {
9599
if (shouldLogInfo) {
96100
if (tty) {

‎packages/vite/src/node/plugins/worker.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,12 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin {
240240
}
241241
},
242242

243+
// @ts-expect-error return void to fallback to other plugins, even though
244+
// the types doesn't allow it. https://github.com/rollup/rollup/pull/4932
243245
shouldTransformCachedModule({ id }) {
244246
if (isBuild && isWorkerQueryId(id) && config.build.watch) {
245247
return true
246248
}
247-
return false
248249
},
249250

250251
async transform(raw, id, options) {

0 commit comments

Comments
 (0)
Please sign in to comment.