File tree 1 file changed +2
-2
lines changed
packages/vite/src/node/plugins 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
188
188
const scriptRel =
189
189
modulePreload && modulePreload . polyfill
190
190
? `'modulepreload'`
191
- : `(${ detectScriptRel . toString ( ) } )()`
191
+ : `/* @__PURE__ */ (${ detectScriptRel . toString ( ) } )()`
192
192
193
193
// There are two different cases for the preload list format in __vitePreload
194
194
//
@@ -207,7 +207,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
207
207
// is appended inside __vitePreload too.
208
208
`function(dep) { return ${ JSON . stringify ( config . base ) } +dep }`
209
209
const preloadCode = `const scriptRel = ${ scriptRel } ;const assetsURL = ${ assetsURL } ;const seen = {};export const ${ preloadMethod } = ${ preload . toString ( ) } `
210
- return preloadCode
210
+ return { code : preloadCode , moduleSideEffects : false }
211
211
}
212
212
} ,
213
213
You can’t perform that action at this time.
0 commit comments