Vue3配置路径简写以及组件通过插件形式引入
环境: Vue3+Vite
1. 创建vite.config.js
const path = require("path");
console.log(path.resolve(__dirname, "./src"));
module.exports = {
base: "/",
outDir: "target",
port: 3001,
open: true,
https: false,
ssr: false,
alias: {
//路径简写配置
"/@/":
原创
2021-01-31 14:32:22 ·
862 阅读 ·
0 评论