1 Star 0 Fork 7

紫阳 / vue-mb-touch

forked from 13434979720 / vue-mb-touch 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
13434979720 提交于 2019-07-14 15:09 . init
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
publicPath: isProduction ? './' : '/',
outputDir: 'dist',
productionSourceMap: isProduction ? false : true,
filenameHashing: !isProduction,
pages: {
index: {
entry: 'examples/main.ts',
template: 'public/index.html',
filename: 'index.html'
}
},
css: {
loaderOptions: {
},
extract: false,
},
configureWebpack: (config) => {
if (!isProduction) {
return;
}
return {
plugins: [
]
};
},
chainWebpack: (config) => {
// 压缩图片
config.module.rule('images').use('image-webpack-loader').loader('image-webpack-loader').options({ bypassOnDebug: true }).end()
// 移除 prefetch 插件
config.plugins.delete('prefetch')
// 移除 preload 插件
config.plugins.delete('preload');
},
devServer: {
port: 8080,
https: false,
open: false,
proxy: {
'/api': {
target: "http://www.wuliu.com",
ws: true,
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
'/static': {
target: "http://www.wuliu.com",
ws: true,
changeOrigin: true,
}
},
}
}
JavaScript
1
https://gitee.com/hongyelan/vue-mb-touch.git
git@gitee.com:hongyelan/vue-mb-touch.git
hongyelan
vue-mb-touch
vue-mb-touch
master

搜索帮助