Skip to content

Commit

Permalink
fix: stop transforming request if the optimizer has been run
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Jan 18, 2022
1 parent 6ecf9b0 commit 92d3f7c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/vite/src/node/server/transformRequest.ts
Expand Up @@ -113,6 +113,13 @@ async function doTransform(
}
}
}

// If the optimizer has been run, further transformations are useless
// as the optimizer will invalidate all the modules anyway.
if (server._isRunningOptimizer) {
return null
}

if (code) {
try {
map = (
Expand Down

0 comments on commit 92d3f7c

Please sign in to comment.