From 8b352ad764113c293b21675602d46438f368276d Mon Sep 17 00:00:00 2001 From: liuyalei Date: Fri, 8 Dec 2023 09:44:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/vite.config.js b/vite.config.js index ff41eb2..c128126 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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)), + }, + }, +});