-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathvite.config.js
More file actions
23 lines (22 loc) · 798 Bytes
/
vite.config.js
File metadata and controls
23 lines (22 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import restart from 'vite-plugin-restart'
import glsl from 'vite-plugin-glsl'
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:
[
glsl(), // Support GLSL files
restart({ restart: [ '../static/**', ] }) // Restart server on static file change
],
}