sveltekit-express-dynamic-basepath Svelte Themes

Sveltekit Express Dynamic Basepath

Integrating SvelteKit into an Express server at a dynamic base path.

Integrating SvelteKit into an Express server at a dynamic base path

pnpm install
pnpm run start

On Windows you might need to enable shell-emulator:

pnpm config set shell-emulator true

Issues

#595 (comment) suggests that this is intended to be a supported configuration, but unfortunately there are some shenanigans as of writing:

  1. Asset imports seem to not respect kit.paths.relative (#9569)
  2. Snafu with trailing slashes on the base path (#13702, workaround)
  3. Trailing slash normalization always redirects against root, which erases a dynamic base (#13718, PR #13719)
  4. ($app/paths).base is determined at build-time (tbd, related to #7242)

References

Top categories

Loading Svelte Themes