Skip to content

Commit

Permalink
refactor: replace __VITE_PRELOAD__ with import.meta.__VITE_PRELOAD__
Browse files Browse the repository at this point in the history
  • Loading branch information
pengbo43 committed May 1, 2024
1 parent 3dbe36f commit 5b4ff2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/importAnalysisBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ type FileDep = {
*/
export const isModernFlag = `__VITE_IS_MODERN__`
export const preloadMethod = `__vitePreload`
export const preloadMarker = `__VITE_PRELOAD__`
export const preloadMarker = `import.meta.__VITE_PRELOAD__`
export const preloadBaseMarker = `__VITE_PRELOAD_BASE__`

export const preloadHelperId = '\0vite/preload-helper.js'
const preloadMarkerRE = new RegExp(preloadMarker, 'g')
const preloadMarkerRE = new RegExp(preloadMarker.split('.').join('\\.'), 'g')

const dynamicImportPrefixRE = /import\s*\(/

Expand Down

0 comments on commit 5b4ff2a

Please sign in to comment.