1 Star 19 Fork 8

trtst/Vue3网易云音乐项目实战教程

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.js 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
trtst 提交于 2022-06-15 18:21 . 添加了自定义指令
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
],
css: {
preprocessorOptions: {
less: {
modifyVars: {
hack: `true; @import (reference) "${resolve('src/assets/less/global.less')}";`,
},
javascriptEnabled: true,
}
}
},
resolve: {
extensions: ['.less', '.js', '.json'],
alias: {
'@': resolve(__dirname, 'src'),
'@apis': resolve(__dirname, 'src/apis'),
'@assets': resolve(__dirname, 'src/assets'),
'@components': resolve(__dirname, 'src/components'),
'@store': resolve(__dirname, 'src/store'),
'@utils': resolve(__dirname, 'src/utils'),
'@views': resolve(__dirname, 'src/views'),
'@directives': resolve(__dirname, 'src/directives'),
}
},
server: {
port: 1234,
host: '0.0.0.0'
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/trtst/vue3_music.git
git@gitee.com:trtst/vue3_music.git
trtst
vue3_music
Vue3网易云音乐项目实战教程
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385