forked from brunosimon/folio-2025
-
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.08 KB
/
Copy pathvite.config.js
File metadata and controls
33 lines (32 loc) · 1.08 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 'dotenv/config'
import restart from 'vite-plugin-restart'
import wasm from 'vite-plugin-wasm'
import topLevelAwait from 'vite-plugin-top-level-await'
import basicSsl from '@vitejs/plugin-basic-ssl'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
export default {
root: 'sources/', // Sources files (typically where index.html is)
envDir: '../', // Directory where the env file is located
publicDir: '../static/', // Path from "root" to static assets (files that are served as they are)
base: './', // Public path (what's after the domain)
server:
{
// https: true,
host: true, // Open to local network and display URL
open: true // Open in browser
},
build:
{
outDir: '../dist', // Output in the dist/ folder
emptyOutDir: true, // Empty the folder first
sourcemap: false // Add sourcemap
},
plugins:
[
wasm(),
topLevelAwait(),
restart({ restart: [ '../static/**', ] }), // Restart server on static file change
nodePolyfills(),
// basicSsl()
]
}