-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvite.config.js
44 lines (41 loc) · 1.22 KB
/
vite.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
35
36
37
38
39
40
41
42
43
44
import { svelte } from '@sveltejs/vite-plugin-svelte';
import routify from '@roxi/routify/vite-plugin';
import { defineConfig } from 'vite';
import { mdsvex } from 'mdsvex';
import { resolve } from 'path';
import postCssNesting from 'postcss-nesting';
import path from "path";
import legacy from "@vitejs/plugin-legacy";
import { chunk } from '@liuli-util/vite-plugin-chunk-node-modules';
const production = process.env.NODE_ENV === 'production';
export default defineConfig({
clearScreen: false,
resolve: {
alias: {
'@': resolve('src'),
$lib: path.resolve("./src/lib"),
}
},
plugins: [
routify({
// render: {
// ssr: {
// enable: false
// },
// },
}),
svelte({
// compilerOptions: {
// dev: !production,
// hydratable: !!process.env.ROUTIFY_SSR_ENABLE,
// hydratable: false,
// },
extensions: ['.md', '.svelte'],
preprocess: [mdsvex({ extension: 'md' })],
}),
// chunk(),
// legacy(),
],
// css: { postcss: { plugins: [postCssNesting()] } },
server: { port: 1337 },
});