-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
41 lines (39 loc) · 984 Bytes
/
Copy pathvite.config.ts
File metadata and controls
41 lines (39 loc) · 984 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
41
import { defineConfig } from 'vite';
import { crx } from '@crxjs/vite-plugin';
import glsl from 'vite-plugin-glsl';
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'node:path';
import manifest from './manifest.json';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
export default defineConfig({
plugins: [
glsl({
include: ['**/*.glsl', '**/*.vert', '**/*.frag'],
}),
crx({ manifest }),
],
publicDir: 'public',
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'@shaders': resolve(__dirname, 'src/shaders'),
},
},
build: {
outDir: 'dist',
minify: 'esbuild',
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
'three-vendor': ['three'],
},
},
input: {
newtab: resolve(__dirname, 'src/newtab.html'),
sidepanel: resolve(__dirname, 'src/sidepanel.html'),
},
},
},
});