From 7d1b59d68fb7a2a7c22d60d2f1a4b8f49e70429d Mon Sep 17 00:00:00 2001 From: dominikg Date: Fri, 10 Nov 2023 17:28:39 +0100 Subject: [PATCH] fix: remove runes from compileModule --- .changeset/grumpy-hornets-applaud.md | 5 +++++ packages/vite-plugin-svelte/src/utils/esbuild.js | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/grumpy-hornets-applaud.md diff --git a/.changeset/grumpy-hornets-applaud.md b/.changeset/grumpy-hornets-applaud.md new file mode 100644 index 000000000..e6dd1809c --- /dev/null +++ b/.changeset/grumpy-hornets-applaud.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/vite-plugin-svelte': patch +--- + +fix compileModule call for optimizing libraries diff --git a/packages/vite-plugin-svelte/src/utils/esbuild.js b/packages/vite-plugin-svelte/src/utils/esbuild.js index aac16bd73..bf36587d2 100644 --- a/packages/vite-plugin-svelte/src/utils/esbuild.js +++ b/packages/vite-plugin-svelte/src/utils/esbuild.js @@ -65,8 +65,7 @@ async function compileSvelte(options, { filename, code }, statsCollection) { // @ts-ignore doesn't exist in Svelte 4 const compiled = svelte.compileModule(code, { filename, - generate: isSvelte5 ? 'client' : 'dom', - runes: true + generate: 'client' }); if (endStat) { endStat();