Commit c2271c0 1 parent cd85eae commit c2271c0 Copy full SHA for c2271c0
File tree 1 file changed +2
-2
lines changed
packages/vite/src/node/optimizer
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ export const commentRE = /<!--.*?-->/gs
358
358
const srcRE = / \b s r c \s * = \s * (?: " ( [ ^ " ] + ) " | ' ( [ ^ ' ] + ) ' | ( [ ^ \s ' " > ] + ) ) / i
359
359
const typeRE = / \b t y p e \s * = \s * (?: " ( [ ^ " ] + ) " | ' ( [ ^ ' ] + ) ' | ( [ ^ \s ' " > ] + ) ) / i
360
360
const langRE = / \b l a n g \s * = \s * (?: " ( [ ^ " ] + ) " | ' ( [ ^ ' ] + ) ' | ( [ ^ \s ' " > ] + ) ) / i
361
- const contextRE =
361
+ const svelteScriptModuleRE =
362
362
/ \b c o n t e x t \s * = \s * (?: " ( [ ^ " ] + ) " | ' ( [ ^ ' ] + ) ' | ( [ ^ \s ' " > ] + ) ) | \b (?< ! = ) (?< ! [ ' " ] ) ( m o d u l e ) \b (? ! [ ' " ] ) (? ! [ ^ > ] + [ ' " ] \s * > ) / i
363
363
364
364
function esbuildScanPlugin (
@@ -567,7 +567,7 @@ function esbuildScanPlugin(
567
567
// exports in <script> means component props. To avoid having two same export name from the
568
568
// star exports, we need to ignore exports in <script>
569
569
if ( p . endsWith ( '.svelte' ) ) {
570
- const contextMatch = contextRE . exec ( openTag )
570
+ const contextMatch = svelteScriptModuleRE . exec ( openTag )
571
571
const context =
572
572
contextMatch &&
573
573
( contextMatch [ 1 ] ||
You can’t perform that action at this time.
0 commit comments