-
Notifications
You must be signed in to change notification settings - Fork 0
/
wepy.config.js
42 lines (41 loc) · 894 Bytes
/
wepy.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const path = require('path')
var prod = process.env.NODE_ENV === 'production'
const DefinePlugin = require('@wepy/plugin-define')
const PluginUglifyjs = require('@wepy/plugin-uglifyjs')
module.exports = {
wpyExt: '.wpy',
eslint: true,
cliLogs: !prod,
static: ['./src/assets'],
build: {},
resolve: {
alias: {
'@': path.join(__dirname, 'src')
},
aliasFields: ['wepy', 'weapp'],
modules: ['node_modules']
},
compilers: {
less: {
compress: prod
},
babel: {
sourceMap: true,
presets: [
'@babel/preset-env'
],
plugins: [
'@wepy/babel-plugin-import-regenerator'
]
}
},
plugins: [
DefinePlugin({
API_URL: prod ? '"https://weapp.liyu.wiki/api/v1/"' : '"http://larabbs.test/api/v1/"'
}),
PluginUglifyjs({})
],
appConfig: {
noPromiseAPI: ['createSelectorQuery']
}
}