Skip to content

Commit c2271c0

Browse files
committed
chore: rename contextRE to svelteScriptModuleRE
1 parent cd85eae commit c2271c0

File tree

1 file changed

+2
-2
lines changed
  • packages/vite/src/node/optimizer

1 file changed

+2
-2
lines changed

packages/vite/src/node/optimizer/scan.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export const commentRE = /<!--.*?-->/gs
358358
const srcRE = /\bsrc\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i
359359
const typeRE = /\btype\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i
360360
const langRE = /\blang\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i
361-
const contextRE =
361+
const svelteScriptModuleRE =
362362
/\bcontext\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))|\b(?<!=)(?<!['"])(module)\b(?!['"])(?![^>]+['"]\s*>)/i
363363

364364
function esbuildScanPlugin(
@@ -567,7 +567,7 @@ function esbuildScanPlugin(
567567
// exports in <script> means component props. To avoid having two same export name from the
568568
// star exports, we need to ignore exports in <script>
569569
if (p.endsWith('.svelte')) {
570-
const contextMatch = contextRE.exec(openTag)
570+
const contextMatch = svelteScriptModuleRE.exec(openTag)
571571
const context =
572572
contextMatch &&
573573
(contextMatch[1] ||

0 commit comments

Comments
 (0)