Skip to content

Commit 81e4e3f

Browse files
committed
use a string
1 parent 61b53b2 commit 81e4e3f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/kit/src/exports/vite/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,10 @@ async function kit({ svelte_config }) {
299299
// because they for example use esbuild.build with `platform: 'browser'`
300300
'esm-env',
301301
// This forces `$app/*` modules to be bundled, since they depend on
302-
// virtual modules like `__sveltekit/paths`
303-
// TODO use RegExp.escape once we drop Node <22
304-
new RegExp(runtime_directory.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&'))
302+
// virtual modules like `__sveltekit/paths` (this isn't a valid bare
303+
// import, but it works with vite-node's externalization logic, which
304+
// uses basic concatenation
305+
'@sveltejs/kit/src/runtime'
305306
]
306307
}
307308
};

0 commit comments

Comments
 (0)