I am deploying sveltekit to a dfinity container and I need to disable minification to debug.
I have to build a static version to deploy it with npm run build -- is there a vite option to disable minification?
I've tried this: svelte.config.js but it doesn't do anything:
vite: {
resolve: {
alias: {
$components: path.resolve('./src/components'),
$stores: path.resolve('./src/stores'),
$api: path.resolve('./src/api')
}
},
build: {
minify: false
}
}
Use vite.config.js/ts instead, and set the build.minify option:
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
build: {
minify: false
}
});
Reference
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