1 Star 1 Fork 0

周小鑫 / leshare-shop-wepy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wepy.config.js 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
coolhwm 提交于 2018-07-23 19:27 . FIX
// const prod = process.env.NODE_ENV === 'production';
const prod = true;
module.exports = {
wpyExt: '.wpy',
cliLogs: false,
build: {
web: {
}
},
eslint: true,
compilers: {
sass: {
outputStyle: 'compressed'
},
babel: {
sourceMap: false,
presets: [
'es2015',
'stage-1'
],
plugins: [
'transform-export-extensions',
'syntax-export-extensions',
'transform-decorators-legacy'
]
}
},
plugins: {
'autoprefixer': {
filter: /\.(wxss|css)$/,
config: {
browsers: ['last 11 iOS versions']
}
}
}
};
if (prod) {
delete module.exports.compilers.babel.sourcesMap;
// 压缩sass
module.exports.compilers['sass'] = {outputStyle: 'compressed'};
// 压缩js
module.exports.plugins = {
autoprefixer: {
filter: /\.(wxss|css)$/,
config: {
browsers: ['last 11 iOS versions']
}
},
uglifyjs: {
filter: /\.js$/,
config: {
}
},
imagemin: {
filter: /\.(jpg|png|jpeg)$/,
config: {
jpg: {
quality: 80
},
png: {
quality: 80
}
}
},
filemin: {
filter: /\.(wxml)$/
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhouxiaoxin123/leshare-shop-wepy.git
git@gitee.com:zhouxiaoxin123/leshare-shop-wepy.git
zhouxiaoxin123
leshare-shop-wepy
leshare-shop-wepy
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891