File tree Expand file tree Collapse file tree
packages/vite/src/node/plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
188188 const scriptRel =
189189 modulePreload && modulePreload . polyfill
190190 ? `'modulepreload'`
191- : `(${ detectScriptRel . toString ( ) } )()`
191+ : `/* @__PURE__ */ (${ detectScriptRel . toString ( ) } )()`
192192
193193 // There are two different cases for the preload list format in __vitePreload
194194 //
@@ -207,7 +207,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
207207 // is appended inside __vitePreload too.
208208 `function(dep) { return ${ JSON . stringify ( config . base ) } +dep }`
209209 const preloadCode = `const scriptRel = ${ scriptRel } ;const assetsURL = ${ assetsURL } ;const seen = {};export const ${ preloadMethod } = ${ preload . toString ( ) } `
210- return preloadCode
210+ return { code : preloadCode , moduleSideEffects : false }
211211 }
212212 } ,
213213
You can’t perform that action at this time.
0 commit comments