-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathvite.config.js
More file actions
52 lines (51 loc) · 1 KB
/
Copy pathvite.config.js
File metadata and controls
52 lines (51 loc) · 1 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { defineConfig } from 'vite';
import { resolve } from 'path';
export default defineConfig({
server: {
open: true,
fs: {
allow: [
resolve(__dirname),
resolve(__dirname, 'src'),
resolve(__dirname, 'public'),
resolve(__dirname, 'demo'),
resolve(__dirname, 'statistics'),
resolve(__dirname, 'vendor'),
resolve(__dirname, 'node_modules'),
]
}
},
build: {
outDir: 'dist',
lib: {
entry: resolve(__dirname, 'src/index.js'),
name: 'THREE.Terrain',
fileName: 'three.terrain'
},
rollupOptions: {
external: ['three'],
output: {
globals: {
three: 'THREE'
}
}
}
},
define: {
'__DEFINES__': '{}',
'global': 'window'
},
optimizeDeps: {
include: [
'three',
'three/examples/jsm/controls/FirstPersonControls.js',
'stats-js',
'dat.gui'
]
},
root: './',
publicDir: 'public',
resolve: {
dedupe: ['three']
}
});