generated from workadventure/map-starter-kit
-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathvite.config.mts.timestamp-1733498464738-64a2e87308079.mjs
44 lines (44 loc) · 5.53 KB
/
vite.config.mts.timestamp-1733498464738-64a2e87308079.mjs
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
// vite.config.mts
import { defineConfig } from "file:///C:/Users/ramella_d/Documents/GitHub/uni-rennes/node_modules/vite/dist/node/index.js";
import { getMaps, getMapsOptimizers, getMapsScripts, LogLevel } from "file:///C:/Users/ramella_d/Documents/GitHub/uni-rennes/node_modules/wa-map-optimizer-vite/dist/index.js";
var maps = getMaps("./maps");
var optimizerOptions = {
logs: process.env.LOG_LEVEL && process.env.LOG_LEVEL in LogLevel ? LogLevel[process.env.LOG_LEVEL] : LogLevel.NORMAL
};
if (process.env.TILESET_OPTIMIZATION && process.env.TILESET_OPTIMIZATION === "true") {
const qualityMin = process.env.TILESET_OPTIMIZATION_QUALITY_MIN ? parseInt(process.env.TILESET_OPTIMIZATION_QUALITY_MIN) : 0.9;
const qualityMax = process.env.TILESET_OPTIMIZATION_QUALITY_MAX ? parseInt(process.env.TILESET_OPTIMIZATION_QUALITY_MAX) : 1;
optimizerOptions.output = {
tileset: {
compress: {
quality: [qualityMin, qualityMax]
}
}
};
}
var vite_config_default = defineConfig({
base: "./",
build: {
rollupOptions: {
input: {
index: "./index.html",
...getMapsScripts(maps)
}
}
},
plugins: [...getMapsOptimizers(maps, optimizerOptions)],
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: "/"
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIj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vzcy5lbnYuVElMRVNFVF9PUFRJTUlaQVRJT04gJiYgcHJvY2Vzcy5lbnYuVElMRVNFVF9PUFRJTUlaQVRJT04gPT09IFwidHJ1ZVwiKSB7XHJcbiAgICBjb25zdCBxdWFsaXR5TWluID0gcHJvY2Vzcy5lbnYuVElMRVNFVF9PUFRJTUlaQVRJT05fUVVBTElUWV9NSU4gPyBwYXJzZUludChwcm9jZXNzLmVudi5USUxFU0VUX09QVElNSVpBVElPTl9RVUFMSVRZX01JTikgOiAwLjk7XHJcbiAgICBjb25zdCBxdWFsaXR5TWF4ID0gcHJvY2Vzcy5lbnYuVElMRVNFVF9PUFRJTUlaQVRJT05fUVVBTElUWV9NQVggPyBwYXJzZUludChwcm9jZXNzLmVudi5USUxFU0VUX09QVElNSVpBVElPTl9RVUFMSVRZX01BWCkgOiAxO1xyXG5cclxuICAgIG9wdGltaXplck9wdGlvbnMub3V0cHV0ID0ge1xyXG4gICAgICAgIHRpbGVzZXQ6IHtcclxuICAgICAgICAgICAgY29tcHJlc3M6IHtcclxuICAgICAgICAgICAgICAgIHF1YWxpdHk6IFtxdWFsaXR5TWluLCBxdWFsaXR5TWF4XSxcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG5cclxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29uZmlnKHtcclxuICAgIGJhc2U6IFwiLi9cIixcclxuICAgIGJ1aWxkOiB7XHJcbiAgICAgICAgcm9sbHVwT3B0aW9uczoge1xyXG4gICAgICAgICAgICBpbnB1dDoge1xyXG4gICAgICAgICAgICAgICAgaW5kZXg6IFwiLi9pbmRleC5odG1sXCIsXHJcbiAgICAgICAgICAgICAgICAuLi5nZXRNYXBzU2NyaXB0cyhtYXBzKSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICB9LFxyXG4gICAgfSxcclxuICAgIHBsdWdpbnM6IFsuLi5nZXRNYXBzT3B0aW1pemVycyhtYXBzLCBvcHRpbWl6ZXJPc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