michalvankodev-site/svelte.config.js
2022-05-07 21:12:26 +02:00

24 lines
565 B
JavaScript

import adapterStatic from '@sveltejs/adapter-static'
import preprocess from 'svelte-preprocess'
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'
const mode = process.env.NODE_ENV
const dev = mode === 'development'
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapterStatic(),
vite: {
plugins: [vanillaExtractPlugin()],
server: { fs: { allow: ['static/build'] } },
},
prerender: { default: true },
},
preprocess: preprocess({
sourceMap: dev,
}),
}
export default config