yapi/ykit.js

38 lines
894 B
JavaScript
Raw Normal View History

2017-07-05 21:08:51 +08:00
var path = require('path');
2017-07-05 19:31:50 +08:00
module.exports = {
2017-07-10 21:29:03 +08:00
plugins: [{
name: 'qunar',
options: {
eslint: true,
configFile: path.resolve(__dirname, "./client/.eslintrc.js")
}
2017-07-11 10:22:06 +08:00
}, {
name: 'antd',
options: {
modifyQuery: function(defaultQuery) { // 可查看和编辑 defaultQuery
defaultQuery.plugins.push('transform-decorators-legacy');
return defaultQuery;
}
}
}],
2017-07-06 14:25:52 +08:00
devtool: 'cheap-source-map',
config: {
exports: [
'./index.js'
],
modifyWebpackConfig: function(baseConfig) {
baseConfig.context = path.resolve(__dirname, "client");
return baseConfig;
}
},
server: {
// true/false默认 false效果相当于 ykit server --hot
hot: true,
// true/false默认 false开启后可在当前打开的页面提示打包错误
2017-07-10 21:29:03 +08:00
overlay: true
2017-07-06 14:25:52 +08:00
},
hooks: {},
commands: []
2017-07-05 19:31:50 +08:00
};