-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathvite.config.js
More file actions
30 lines (29 loc) · 757 Bytes
/
vite.config.js
File metadata and controls
30 lines (29 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
import { resolve } from 'path';
import { defineConfig } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
import { externalizeDeps } from 'vite-plugin-externalize-deps';
export default defineConfig(({ command }) => ({
publicDir: command === 'build' ? false : 'public',
resolve: {
alias: {
'@three.ez/batched-mesh-extensions': resolve(__dirname, 'src/index.webgl.ts')
}
},
build: {
sourcemap: true,
lib: {
entry: resolve(__dirname, 'src/index.webgl.ts'),
fileName: 'build/webgl',
formats: ['es', 'cjs']
}
},
plugins: [
externalizeDeps(),
viteStaticCopy({
targets: [{
src: ['LICENSE', 'package.json', 'README.md'],
dest: './'
}]
})
]
}));