-
Notifications
You must be signed in to change notification settings - Fork 5
/
vite.config.js
65 lines (64 loc) · 1.35 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import ViteRestart from "vite-plugin-restart";
// import legacy from '@vitejs/plugin-legacy';
import mkcert from "vite-plugin-mkcert";
import dynamicImport from "vite-plugin-dynamic-import";
import { viteStaticCopy } from "./tailoff/vite/vite-plugin-statik-copy";
export default ({ command }) => ({
base: command === "serve" ? "" : "/frontend/",
publicDir: false,
build: {
emptyOutDir: true,
assetsDir: "",
manifest: true,
outDir: "./public/frontend/",
rollupOptions: {
input: {
site: "./tailoff/js/site.ts",
},
},
},
plugins: [
// legacy({
// targets: ['defaults', 'not IE 11'],
// }),
dynamicImport(),
ViteRestart({
reload: ["./templates/**/*"],
}),
mkcert(),
viteStaticCopy({
targets: [
{
src: "./tailoff/icons/",
dest: "",
},
{
src: "./tailoff/img/",
dest: "",
},
{
src: "./tailoff/fonts/",
dest: "",
},
{
src: "./tailoff/css/inert.css",
dest: "",
},
],
watch: {
reloadPageOnChange: true,
copyToDest: true,
},
}),
],
server: {
fs: {
strict: false,
},
origin: "https://localhost:3000",
host: "0.0.0.0",
port: 3000,
https: true,
strictPort: true,
},
});