Skip to content

Commit

Permalink
fix(optimizer): exclude ?worker and ?raw from runtime dep discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 29, 2021
1 parent 462f2bc commit d216da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export function tryNodeResolve(
exclude?.includes(id) ||
isCSSRequest(resolved) ||
server.config.assetsInclude(resolved) ||
resolved.endsWith('.json')
/\.json$|\?(worker|raw)/.test(resolved)
) {
// excluded from optimization
// Inject a version query to npm deps so that the browser
Expand Down

0 comments on commit d216da0

Please sign in to comment.