diff --git a/.changeset/eleven-wombats-begin.md b/.changeset/eleven-wombats-begin.md new file mode 100644 index 000000000..b1c9220f9 --- /dev/null +++ b/.changeset/eleven-wombats-begin.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/vite-plugin-svelte': patch +--- + +fix: handle closing tags in attributes when detecting script language diff --git a/packages/vite-plugin-svelte/src/utils/compile.js b/packages/vite-plugin-svelte/src/utils/compile.js index dc9dfd4de..052d7d80a 100644 --- a/packages/vite-plugin-svelte/src/utils/compile.js +++ b/packages/vite-plugin-svelte/src/utils/compile.js @@ -7,7 +7,8 @@ import { log } from './log.js'; import { createInjectScopeEverythingRulePreprocessorGroup } from './preprocess.js'; import { mapToRelative } from './sourcemaps.js'; -const scriptLangRE = /