-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
28 lines (27 loc) · 1.29 KB
/
Copy pathvite.config.js
File metadata and controls
28 lines (27 loc) · 1.29 KB
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
import {defineConfig} from 'vite';
import solidPlugin from 'vite-plugin-solid';
import * as pf from 'path';
export default defineConfig({
publicDir: 'root', // to copy manifest.json and other stuff
plugins: [solidPlugin({solid: {delegateEvents: false}})],
build: {
minify: false,
outDir: 'dist/unpacked',
emptyOutDir: false, // necessary for the watch task which runs vite (for pages) and rollup (for scripts) in parallel
// otherwise vite will erase scripts written to output dir by rollup
target: 'esnext',
polyfillDynamicImport: false,
polyfillModulePreload: false,
rollupOptions: {
input: {
'devtools-page': pf.resolve(__dirname, 'pages/devtools-page.html'),
'panel': pf.resolve(__dirname, 'pages/panel.html'),
'options': pf.resolve(__dirname, 'pages/options.html'),
'popup-development': pf.resolve(__dirname, 'pages/popups/development.html'),
'popup-production': pf.resolve(__dirname, 'pages/popups/production.html'),
'popup-disabled': pf.resolve(__dirname, 'pages/popups/disabled.html'),
'popup-restricted': pf.resolve(__dirname, 'pages/popups/restricted.html')
}
}
}
});