-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
42 lines (41 loc) · 1.05 KB
/
vite.config.ts
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
import hotReloadExtension from 'hot-reload-extension-vite';
import vue from '@vitejs/plugin-vue';
import checker from 'vite-plugin-checker';
import { resolve } from 'path';
export default {
plugins: [
vue(),
checker({
// vueTsc: true, // https://github.com/fi3ework/vite-plugin-checker/issues/306
eslint: {
lintCommand: 'eslint "./src"'
},
overlay: {
initialIsOpen: false
}
}),
hotReloadExtension({
log: true,
backgroundPath: 'src/background/index.ts' // relative path to background script file
})
],
resolve: {
alias: {
'@': resolve(__dirname, './src') // map '@' to './src'
}
},
build: {
rollupOptions: {
input: {
popup: resolve(__dirname, 'index.html'),
content: resolve(__dirname, 'src/content/index.ts'),
background: resolve(__dirname, 'src/background/index.ts'),
options: resolve(__dirname, 'src/options/index.html')
},
output: {
dir: 'dist',
entryFileNames: '[name]/index.js'
}
}
}
};