-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathvite.config.js
More file actions
35 lines (34 loc) · 757 Bytes
/
vite.config.js
File metadata and controls
35 lines (34 loc) · 757 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
import tampermonkey from './build/plugins/tampermonkey'
import globalConfig from './global.config'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import { resolve } from 'path'
export default defineConfig(config => {
/** @type {import('vite').UserConfig} */
return {
plugins: [
vue({
customElement: true,
}),
tampermonkey(config),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
build: {
rollupOptions: {
input: 'src/main.js',
output: {
entryFileNames: globalConfig.scriptName,
},
},
outDir: globalConfig.outDir,
},
publicDir: false,
server: {
host: '0.0.0.0',
},
}
})