yxdth5/vite.config.js

20 lines
435 B
JavaScript
Raw Normal View History

2023-12-08 09:44:23 +08:00
import { fileURLToPath, URL } from "node:url";
2023-12-07 09:39:34 +08:00
2023-12-08 09:44:23 +08:00
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
2023-12-07 09:39:34 +08:00
// https://vitejs.dev/config/
export default defineConfig({
2023-12-08 09:44:23 +08:00
server: {
// ← ← ← ← ← ←
host: "0.0.0.0", // ← 新增内容 ←
2023-12-07 17:15:51 +08:00
},
2023-12-08 09:44:23 +08:00
base: "./", //生产环境路径
plugins: [vue()],
2023-12-07 09:39:34 +08:00
resolve: {
alias: {
2023-12-08 09:44:23 +08:00
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});