2 Star 21 Fork 6

极品新 / 识图AI(接入百度AI平台)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wepy.config.js 1.64 KB
一键复制 编辑 原始数据 按行查看 历史
sea_lx 提交于 2019-04-13 11:17 . 初版模板提交
const path = require('path')
var prod = process.env.NODE_ENV === 'production'
module.exports = {
wpyExt: '.wpy',
eslint: false,
cliLogs: true,
// build: {
// web: {
// htmlTemplate: path.join('src', 'index.template.html'),
// htmlOutput: path.join('web', 'index.html'),
// jsOutput: path.join('web', 'index.js')
// }
// },
resolve: {
alias: {
'@': path.join(__dirname, 'src')
},
aliasFields: ['wepy', 'weapp'],
modules: ['node_modules']
},
compilers: {
pug: {},
stylus: {
compress: true
},
// typescript: {
// compilerOptions: {
// module: 'system'
// }
// },
babel: {
sourceMap: true,
presets: [
'env'
],
plugins: [
'babel-plugin-transform-class-properties',
'transform-export-extensions',
'syntax-export-extensions'
]
}
},
plugins: {
axios: {},
px2units: {
filter: /\.wxss$/
},
autoprefixer: {
filter: /\.(wxss|stylus|css)$/,
config: {
browsers: ['last 11 iOS versions']
}
},
},
appConfig: {
noPromiseAPI: ['createSelectorQuery']
}
}
if(prod){
module.exports.cliLogs = false
delete module.exports.compilers.babel.sourcesMap;
// 压缩stylus
module.exports.compilers['stylus'] = {
compress: true
}
// 压缩js
module.exports.plugins = {
axios: {},
uglifyjs: {
filter: /\.js$/,
config: {}
},
px2units: {
filter: /\.wxss$/
},
autoprefixer: {
filter: /\.(wxss|stylus|css)$/,
config: {
browsers: ['last 11 iOS versions']
}
},
imagemin: {
filter: /\.(jpg|png|jpeg)$/,
config: {
jpg: {
quality: 80
},
png: {
quality: 80
}
}
}
}
}
JavaScript
1
https://gitee.com/sea_lx/sea-ai.git
git@gitee.com:sea_lx/sea-ai.git
sea_lx
sea-ai
识图AI(接入百度AI平台)
master

搜索帮助