2023-11-22 15:12:56 +08:00
|
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
2023-11-22 18:30:06 +08:00
|
|
|
|
import path from 'path'
|
2023-11-22 15:12:56 +08:00
|
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [vue()],
|
|
|
|
|
server: { // ← ← ← ← ← ←
|
|
|
|
|
host: '0.0.0.0' // ← 新增内容 ←
|
2023-11-22 18:30:06 +08:00
|
|
|
|
},
|
|
|
|
|
resolve:{
|
|
|
|
|
//别名配置,引用src路径下的东西可以通过@如:import Layout from '@/layout/index.vue'
|
|
|
|
|
alias: {
|
|
|
|
|
'@': path.resolve(__dirname, 'src')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-22 15:12:56 +08:00
|
|
|
|
})
|