-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
42 lines (41 loc) · 1.09 KB
/
vite.config.js
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
import {defineConfig} from "vite";
import react from "@vitejs/plugin-react-swc";
import {viteStaticCopy} from "vite-plugin-static-copy";
import {fileURLToPath, URL} from "url";
import commonjs from "vite-plugin-commonjs";
export default defineConfig({
plugins: [
react(),
viteStaticCopy({
targets: [
{
src: "configuration.js",
dest: ""
}
]
}),
commonjs()
],
optimizeDeps: {
include: ["hash.js", "@eluvio/elv-client-js"],
},
build: {
outDir: "dist",
manifest: true,
commonjsOptions: { transformMixedEsModules: true }
},
server: {
port: 8110,
host: true
},
resolve: {
// Synchronize with jsconfig.json
alias: {
"@/assets": fileURLToPath(new URL("./src/assets", import.meta.url)),
"@/components": fileURLToPath(new URL("./src/components", import.meta.url)),
"@/pages": fileURLToPath(new URL("./src/pages", import.meta.url)),
"@/stores": fileURLToPath(new URL("./src/stores", import.meta.url)),
"@/utils": fileURLToPath(new URL("./src/utils", import.meta.url))
}
}
});