Describe the bug
source maps don't seem to work on server-side code.
i enabled them in like 4 different spots because i have no idea which one is supposed to work:
svelte.config.js
import adapter from '@sveltejs/adapter-auto';
import preprocess from 'svelte-preprocess';
const config = {
compilerOptions: {
enableSourcemap: true, // here
},
preprocess: preprocess({
sourceMap: true, // here
}),
kit: {
adapter: adapter()
}
};
export default config;
vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
const config: UserConfig = {
plugins: [sveltekit()],
build: {
sourcemap: true, // here
},
};
export default config;
tsconfig.json
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true, // here
"strict": true
}
}
to reproduce
- clone the repro repo (link below)
npm install && npm run dev
- navigate to the site and click the button
the debugger statement is hit but the compiled js is displayed instead of the source code:

Reproduction
https://github.com/DetachHead/sveltekit-issue
Logs
No response
System Info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11500T @ 1.50GHz
Memory: 952.27 MB / 15.73 GB
Binaries:
Node: 18.10.0 - C:\Program Files\nodejs\node.EXE
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62)
Internet Explorer: 11.0.19041.1566
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.84
@sveltejs/kit: next => 1.0.0-next.520
svelte: ^3.44.0 => 3.52.0
vite: ^3.1.0 => 3.1.8
Severity
serious, but I can work around it
Additional Information
No response
Describe the bug
source maps don't seem to work on server-side code.
i enabled them in like 4 different spots because i have no idea which one is supposed to work:
svelte.config.jsvite.config.tstsconfig.json{ "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { "allowJs": true, "checkJs": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, // here "strict": true } }to reproduce
npm install && npm run devthe

debuggerstatement is hit but the compiled js is displayed instead of the source code:Reproduction
https://github.com/DetachHead/sveltekit-issue
Logs
No response
System Info
System: OS: Windows 10 10.0.19044 CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11500T @ 1.50GHz Memory: 952.27 MB / 15.73 GB Binaries: Node: 18.10.0 - C:\Program Files\nodejs\node.EXE npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62) Internet Explorer: 11.0.19041.1566 npmPackages: @sveltejs/adapter-auto: next => 1.0.0-next.84 @sveltejs/kit: next => 1.0.0-next.520 svelte: ^3.44.0 => 3.52.0 vite: ^3.1.0 => 3.1.8Severity
serious, but I can work around it
Additional Information
No response