改配置

This commit is contained in:
liuyalei 2023-12-08 09:44:23 +08:00
parent 3c53d5f6f0
commit 8b352ad764
1 changed files with 12 additions and 12 deletions

View File

@ -1,19 +1,19 @@
import { fileURLToPath, URL } from 'node:url'
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
server: { // ← ← ← ← ← ←
host: '0.0.0.0' // ← 新增内容 ←
server: {
// ← ← ← ← ← ←
host: "0.0.0.0", // ← 新增内容 ←
},
plugins: [
vue(),
],
base: "./", //生产环境路径
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});