改配置

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