-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
37 lines (36 loc) · 822 Bytes
/
vite.config.ts
File metadata and controls
37 lines (36 loc) · 822 Bytes
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
import { defineConfig } from "vite";
import babel from "vite-plugin-babel";
import "dotenv/config";
/** @type {import('vite').UserConfig} */
export default defineConfig({
root: "./www",
publicDir: "./public",
build: {
outDir: "../build",
minify: false,
emptyOutDir: false,
},
plugins: [
babel({
babelConfig: {
presets: ["@babel/preset-env"],
},
}),
],
resolve: {
alias: {
"@lang": "/src/locales/lang",
"@language": "/src/locales",
"@plugin": "/src/plugins",
"@ts": "/src/ts",
"@js": "/src/js",
"@scss": "/src/styles/scss",
},
},
server: {
host: process.env.VITE_WEB_HOST ?? ("localhost" as string),
port: +(process.env.VITE_WEB_PORT ?? 8080),
cors: true,
allowedHosts: ["cookie.squareweb.app"]
},
});