diff --git a/.changeset/swift-dolphins-cheat.md b/.changeset/swift-dolphins-cheat.md new file mode 100644 index 000000000..2692939c6 --- /dev/null +++ b/.changeset/swift-dolphins-cheat.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/vite-plugin-svelte': patch +--- + +Allow script tags to span multiple lines diff --git a/packages/vite-plugin-svelte/src/utils/compile.js b/packages/vite-plugin-svelte/src/utils/compile.js index 83f2c840d..4c0e524c9 100644 --- a/packages/vite-plugin-svelte/src/utils/compile.js +++ b/packages/vite-plugin-svelte/src/utils/compile.js @@ -14,7 +14,7 @@ import { enhanceCompileError } from './error.js'; // which is closer to the other regexes in at least not falling into commented script // but ideally would be shared exactly with svelte and other tools that use it const scriptLangRE = - /|