vue.config.js配置别名alias、配置生产环境清除console

项目中使用引入文件有时候路径比较深,需要使用"../../../xx.js"这种类似的路劲引入,这种方式比较笨,可以使用webpack的别名alias配置来解决。 首先,先确定项目中是否有path模块: 如果没有path模块需要先安装path npm install path --save    以下为vue.config.js配置 const path = require("path");
相关文章
相关标签/搜索