I cannot find them anywhere, I don't even see that they are being created when I run npm run build. I am using the latest version of sveltekit with typescript. I would assume the sourcemaps would be located in the output folder of the .svelte-kit directory but no dice.
// svelte.config.js
...
const config = {
compilerOptions: {
enableSourcemap: true
},
preprocess: [
preprocess({
postcss: true,
sourceMap: true
})
],
kit: {
adapter: vercel(),
methodOverride: {
allowed: ['PATCH', 'DELETE']
},
}
};
export default config;
I also have sourceMap: true under the compilerOptions of my tsconfig.json
I use SvelteKit 1.0.0-next.350 with adapter-node and npm run build puts result files to <project root>/build directory, not to <project root>/.svelte-kit. It is because the build out dir for adapter-node is set in the adapter.
Try to check the adapter you are actually using. Maybe the out dir for adapter-vercel is <project root>/.vercel_build_output or <project root>/.vercel/output?
Also you can try to enable this sourcemap option:
export default {
kit: {
vite: {
build: {
sourcemap: true
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With