1234567891011121314151617181920212223 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import { resolve } from 'path'
- export default defineConfig({
- plugins: [vue()],
- //解决“vite use `--host` to expose”
- base: './',
- server: {
- host: '0.0.0.0',
- // port: 8080,
- open: true
- },
- resolve:{
- //别名配置,引用src路径下的东西可以通过@如:import Layout from '@/layout/index.vue'
- alias:[
- {
- find:'@',
- replacement:resolve(__dirname,'src')
- }
- ]
- }
- })
|