1 Star 0 Fork 0

kevin/wepy-weui-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wepy.config.js 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
sid 提交于 2017-12-13 11:04 . remove sass
const path = require('path');
let prod = process.env.NODE_ENV === 'production';
module.exports = {
eslint: true,
wpyExt: ".wpy",
build: {
web: {
apis: ['showToast', 'showActionSheet', 'showModal'],
components: ['navigator', 'button', 'icon', 'progress', 'slider', 'radio', 'radio-group', 'checkbox', 'checkbox-group', 'switch'],
htmlTemplate: path.join('src', 'index.template.html'),
htmlOutput: path.join('web', 'index.html'),
jsOutput: path.join('web', 'index.js')
}
},
compilers: {
less: {
},
babel: {
sourceMap: true,
presets: [
"es2015",
"stage-1"
],
plugins: [
"transform-export-extensions",
"syntax-export-extensions",
]
}
}
};
if (prod) {
delete module.exports.compilers.babel.sourcesMap;
// 压缩less
module.exports.compilers['less'] = {compress: true}
// 压缩js
module.exports.plugins = {
uglifyjs: {
filter: /\.js$/,
config: {
}
},
/*imagemin: {
filter: /\.(jpg|png|jpge)$/,
config: {
jpg: {
quality: 80
},
png: {
quality: 80
}
}
}*/
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huangxin1999/wepy-weui-demo.git
git@gitee.com:huangxin1999/wepy-weui-demo.git
huangxin1999
wepy-weui-demo
wepy-weui-demo
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385