KkosmetickySalon/vite.config.ts

48 lines
1.1 KiB
TypeScript

import { sentrySvelteKit } from "@sentry/sveltekit";
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,
fs: {
allow: ['..'],
}
},
envPrefix: "PUBLIC_",
plugins: [sentrySvelteKit({
sourceMapsUploadOptions: {
org: "mattmor",
project: "kkosmetickysalon",
//telemetry off
telemetry: false,
}
}),
sveltekit(),
purgeCss({
safelist: {
// any selectors that begin with "hljs-" will not be purged
greedy: [/^hljs-/],
},
})],
define: {
'process.env.VITE_BUILD_TIME': JSON.stringify(new Date().toISOString()),
},
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
},
resolve: {
alias: {
$lib: path.resolve('.', 'src/lib'),
$root: path.resolve('.'),
$src: path.resolve('.', 'src'),
$routes: path.resolve('.', 'src/routes'),
$content: path.resolve('.', 'src/content'),
}
}
});