Skip to content

Commit

Permalink
fix: fix incorrect preload placeholder regex
Browse files Browse the repository at this point in the history
fix #1686
  • Loading branch information
yyx990803 committed Jan 24, 2021
1 parent 028c3bb commit 5ca43ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/importAnaysisBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const preloadMarker = `__VITE_PRELOAD__`

const preloadHelperId = 'vite/preload-helper'
const preloadCode = `const seen = {};export const ${preloadMethod} = ${preload.toString()}`
const preloadMarkerRE = new RegExp(`,?"${preloadMarker}"`, 'g')
const preloadMarkerRE = new RegExp(`"${preloadMarker}"`, 'g')

/**
* Helper for preloading CSS and direct imports of async chunks in parallell to
Expand Down

0 comments on commit 5ca43ef

Please sign in to comment.