KkosmetickySalon/vite.config.ts

48 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-03-16 02:49:15 +00:00
import { sentrySvelteKit } from "@sentry/sveltekit";
2023-11-06 10:02:38 +00:00
import { purgeCss } from 'vite-plugin-tailwind-purgecss';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import path from 'path';
export default defineConfig({
server: {
host: 'localhost',
port: 5174,
2024-07-03 08:10:15 +00:00
fs: {
allow: ['..'],
}
2023-11-06 10:02:38 +00:00
},
2024-03-16 02:49:15 +00:00
envPrefix: "PUBLIC_",
plugins: [sentrySvelteKit({
sourceMapsUploadOptions: {
2024-03-20 15:09:11 +00:00
org: "mattmor",
project: "kkosmetickysalon",
//telemetry off
telemetry: false,
2024-03-16 02:49:15 +00:00
}
2024-03-20 15:09:11 +00:00
}),
sveltekit(),
purgeCss({
2024-03-16 02:49:15 +00:00
safelist: {
// any selectors that begin with "hljs-" will not be purged
greedy: [/^hljs-/],
},
2024-03-20 15:09:11 +00:00
})],
define: {
'process.env.VITE_BUILD_TIME': JSON.stringify(new Date().toISOString()),
},
2023-11-06 10:02:38 +00:00
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
resolve: {
alias: {
2024-07-03 08:10:15 +00:00
$lib: path.resolve('.', 'src/lib'),
$root: path.resolve('.'),
$src: path.resolve('.', 'src'),
$routes: path.resolve('.', 'src/routes'),
$content: path.resolve('.', 'src/content'),
2023-11-06 10:02:38 +00:00
}
}
2024-03-16 02:49:15 +00:00
});