-
Notifications
You must be signed in to change notification settings - Fork 1
/
svelte.config.js
34 lines (31 loc) · 892 Bytes
/
svelte.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import preprocess from "svelte-preprocess";
import adapter from '@sveltejs/adapter-static';
import imagePreprocessor from 'svimg';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
target: '#svelte',
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: null
}),
appDir: '_app',
},
preprocess: [
imagePreprocessor({
inputDir: 'static',
outputDir: 'static/optimized-images',
webp: true,
avif: false
}),
preprocess({
"postcss": true
})
]
};
export default config;
// Workaround until SvelteKit uses Vite 2.3.8 (and it's confirmed to fix the Tailwind JIT problem)
const mode = process.env.NODE_ENV;
const dev = mode === "development";
process.env.TAILWIND_MODE = dev ? "watch" : "build";