forked from ABI-Web-Apps/NRRD_Segmentation_Tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
49 lines (48 loc) · 1.26 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
import glslify from "rollup-plugin-glslify";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => {
return tag === "ion-icon"; // (return true)
},
},
},
}),
glslify({
// Default
include: ["**/*.vs", "**/*.fs", "**/*.vert", "**/*.frag", "**/*.glsl"],
// Undefined by default
exclude: "node_modules/**",
// Compress shader by default using logic from rollup-plugin-glsl
compress: true,
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
base: "/NRRD_Segmentation_Tool/",
build: {
outDir: "./build",
},
server: {
host: "0.0.0.0",
// open: true,
// proxy: {
// // 本地开发环境通过代理实现跨域,生产环境使用 nginx 转发
// // 正则表达式写法
// "^/": {
// target: "https://github.com/LinkunGao/copper3d-datasets/", // 后端服务实际地址
// changeOrigin: true, //开启代理
// // rewrite: (path) => path.replace(/^\/LinkunGao/, ""),
// },
// },
},
});