generated from workadventure/map-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
27 lines (25 loc) · 804 Bytes
/
vite.config.ts
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
import { defineConfig } from "vite";
import { getMaps, getMapsOptimizers, getMapsScripts } from "wa-map-optimizer-vite";
const maps = getMaps();
export default defineConfig({
base: "./",
build: {
rollupOptions: {
input: {
index: "./index.html",
...getMapsScripts(maps),
},
},
},
plugins: [...getMapsOptimizers(maps)],
server: {
host: "localhost",
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization",
"Cache-Control": "no-cache, no-store, must-revalidate",
},
open: "/",
},
});