From 46c78bfdbf226488544f86e417ea8dd5089d4191 Mon Sep 17 00:00:00 2001 From: heshunme Date: Sun, 30 Jun 2024 01:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E5=8F=AF=E4=BB=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8@views=E6=9D=A5=E6=8C=87=E4=BB=A3/src/views=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E4=BA=86=EF=BC=8Csrc=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=85=B6=E4=BB=96=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E5=92=8Cpublic=E6=96=87=E4=BB=B6=E5=A4=B9=E5=90=8C=E7=90=86?= =?UTF-8?q?=E3=80=82=E5=90=8C=E6=97=B6@=E8=A2=AB=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E6=8C=87=E4=BB=A3src?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vite.config.js b/vite.config.js index 05c1740..0c046a4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,7 +1,20 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import path from 'path'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], + resolve: { + alias: { + '@': path.resolve(__dirname, 'src'), + '@assets': path.resolve(__dirname, 'src/assets'), + '@public': path.resolve(__dirname, 'public'), + '@components': path.resolve(__dirname, 'src/components'), + '@views': path.resolve(__dirname, 'src/views'), + '@store': path.resolve(__dirname, 'src/store'), + '@router': path.resolve(__dirname, 'src/router'), + '@services': path.resolve(__dirname, 'src/services'), + } + } })