From 122996f08d7809f29fd0b4477530a747064da704 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Wed, 15 Feb 2023 22:20:23 +0100 Subject: [PATCH] fix(frontend): move vite file to TS Signed-off-by: Sam Therapy --- frontend/{vite.config.js => vite.config.ts} | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) rename frontend/{vite.config.js => vite.config.ts} (52%) 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 } };