I have the following...
//vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
build: {
sourcemap: true
}
});
// svelte.config.js
import adapter from '@sveltejs/adapter-static';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter({
// default options are shown. On some platforms
// these options are set automatically — see below
pages: '../app/src/main/resources/static',
assets: '../app/src/main/resources/static',
fallback: null,
precompress: false,
strict: true
})
},
compilerOptions: {
sourcemap: true
}
};
export default config;
However, when I run I do not see the sourcemaps being outputed when I run npm run build.
This question is not the same problem as you can see I have that property set. My guess is it is related to me using the resource-static.
How can I generate sourcemaps with the resource-static kit.
true,false,'inline'or'hidden'. Svelte's config can either be asourcemap?: object | string;per the documentation. This parameter should be "An initial sourcemap that will be merged into the final output sourcemap. This is usually the preprocessor sourcemap." Maybe the parameter needs to be provided a templatesitemap.xml? If that doesn't work I also found svelte-sitemap.