Skip to content

Commit

Permalink
fix(build): declare moduleSideEffects for vite:modulepreload-polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
linl33 committed May 5, 2023
1 parent 9041e19 commit 46ff825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/modulePreloadPolyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function modulePreloadPolyfillPlugin(config: ResolvedConfig): Plugin {
if (!polyfillString) {
polyfillString = `${isModernFlag}&&(${polyfill.toString()}());`
}
return polyfillString
return { code: polyfillString, moduleSideEffects: true }
}
},
}
Expand Down

0 comments on commit 46ff825

Please sign in to comment.