diff --git a/frontend/vite.config.js b/frontend/vite.config.ts similarity index 52% rename from frontend/vite.config.js rename to frontend/vite.config.ts index 5b06e8a..d6ebbf9 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.ts @@ -1,8 +1,8 @@ +import { optimizeCss } from 'carbon-preprocess-svelte'; import { sveltekit } from '@sveltejs/kit/vite'; -/** @type {import('vite').UserConfig} */ -const config = { - plugins: [sveltekit()], +const config: import('vite').UserConfig = { + plugins: [sveltekit(), process.env.NODE_ENV === 'production' && optimizeCss()], test: { include: ['src/**/*.{test,spec}.{js,ts}'] }, @@ -11,6 +11,9 @@ const config = { '/api': 'http://localhost:3008', '/swagger': 'http://localhost:3008' } + }, + build: { + sourcemap: true } };