-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
49 lines (46 loc) · 1.18 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
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import Layouts from 'vite-plugin-vue-layouts'
const { resolve } = require('path')
// import path from 'path'
// import ViewLauncherVuePlugin from '@view-launcher/rollup-plugin-vue'
export default defineConfig(() => {
// load the .env file
// you may want to create one like `.env.development.local`
// const env = loadEnv(mode, __dirname)
return {
plugins: [
vue(),
Layouts({
defaultLayout: 'Default'
})
],
build: {
target: ['es2021', 'chrome97', 'safari13'],
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_DEBUG,
emptyOutDir: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
nested: resolve(__dirname, 'splashscreen.html')
}
}
},
resolve: {
alias: {
'@': resolve(__dirname, './src')
}
},
server: {
fs: {
// Allow serving files from one level up to the project root
allow: ['..']
}
},
// base: path.resolve(__dirname, './dist/'),
define: {
'process.env': {}
}
}
})