GPU_Web/vite.config.ts
2025-11-24 10:29:42 +08:00

24 lines
559 B
TypeScript

// vite.config.js
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "node:url";
import path from "path";
export default defineConfig({
plugins: [vue()],
// resolve: {
// alias: {
// '@': fileURLToPath(new URL('./src', import.meta.url))
// }
// },
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
server: {
port: 8080, // 设置开发服务器端口为 8080
host: true,
open: true, // 可选:启动时自动打开浏览器
},
});