We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84686b3 commit 1c4cb7eCopy full SHA for 1c4cb7e
packages/vite-plugin-svelte/src/utils/constants.js
@@ -1,8 +1,11 @@
1
import { createRequire } from 'node:module';
2
3
const sveltePkg = createRequire(import.meta.url)('svelte/package.json');
4
-// ensure we only include deps used for the client runtime of current svelte version
5
-export const SVELTE_RUNTIME_DEPENDENCIES = ['clsx'].filter((dep) => !!sveltePkg.dependencies[dep]);
+
+// list of svelte runtime dependencies to optimize together with svelte itself
6
+export const SVELTE_RUNTIME_DEPENDENCIES = [
7
+ 'clsx' // avoids dev server restart after page load with npm + vite6 (see #1067)
8
+].filter((dep) => !!sveltePkg.dependencies?.[dep]);
9
10
export const SVELTE_IMPORTS = Object.entries(sveltePkg.exports)
11
.map(([name, config]) => {
0 commit comments