1 Star 0 Fork 0

TengQ/vue-admin-cli

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
TengQ 提交于 2021-12-10 00:08 . Initial commit
// 基础路径 注意发布之前要先修改这里
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
module.exports = {
lintOnSave: true,
productionSourceMap: false,
// configureWebpack: config => {
// if (process.env.NODE_ENV === 'production') {
// return {
// plugins: [
// new BundleAnalyzerPlugin()
// ]
// }
// }
// },
devServer: {
port: 8080, // 端口号
hotOnly: true, // 热更新
proxy: {
'/api': { //这里最好有一个 /
target: 'http://localhost:8081', // 后台接口域名
ws: false, //如果要代理 websockets,配置这个参数
secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true, //是否跨域
pathRewrite: {
'^/api':'/api'
}
}
}
},
chainWebpack: (config) => {
const entry = config.entry('app');
entry
.add('babel-polyfill')
.end();
entry
.add('classlist-polyfill')
.end();
entry
.add('@/mock')
.end();
},
css: {
extract: { ignoreOrder: true }
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/wx_tengq/vue-admin-cli.git
[email protected]:wx_tengq/vue-admin-cli.git
wx_tengq
vue-admin-cli
vue-admin-cli
master

搜索帮助