-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
33 lines (32 loc) · 1.02 KB
/
Copy pathvite.config.js
File metadata and controls
33 lines (32 loc) · 1.02 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
import restart from 'vite-plugin-restart'
import topLevelAwait from 'vite-plugin-top-level-await'
export default {
root: 'src/', // Sources files (typically where index.html is)
publicDir: '../static/', // Path from "root" to static assets (files that are served as they are)
server:
{
host: true, // Open to local network and display URL
open: !('SANDBOX_URL' in process.env || 'CODESANDBOX_HOST' in process.env) // Open if it's not a CodeSandbox
},
build:
{
outDir: '../dist', // Output in the dist/ folder
emptyOutDir: true, // Empty the folder first
sourcemap: true // Add sourcemap
},
plugins:
[
restart({ restart: [ '../static/**', ] }), // Restart server on static file change
topLevelAwait()
],
resolve:
{
alias:
{
'three/examples/jsm': 'three/examples/jsm',
'three/addons': 'three/examples/jsm',
'three/tsl': 'three/webgpu',
'three': 'three/webgpu',
}
}
}