-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
40 lines (38 loc) · 756 Bytes
/
vite.config.js
File metadata and controls
40 lines (38 loc) · 756 Bytes
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
import { defineConfig, loadEnv } from 'vite'
import tailwindcss from "@tailwindcss/vite";
const dest = './theme/assets/dist'
const entries = [
'./theme/assets/main.js',
'./theme/assets/styles/editor-style.css',
]
export default defineConfig(({ mode }) => {
return {
base: './',
resolve: {
alias: {
'@': __dirname
}
},
server: {
cors: true,
https: false,
host: true,
port: 3012,
hmr: {host: 'localhost', protocol: 'ws'},
},
build: {
outDir: dest,
emptyOutDir: true,
manifest: true,
target: 'es2018',
rollupOptions: {
input: entries,
},
minify: true,
write: true
},
plugins: [
tailwindcss(),
],
}
})