yapi/ykit.js

26 lines
831 B
JavaScript
Raw Normal View History

2017-07-05 21:08:51 +08:00
var path = require('path');
2017-07-06 01:09:33 +08:00
var ExtractTextPlugin = require("extract-text-webpack-plugin");
2017-07-06 10:42:38 +08:00
// var extractCSS = new ExtractTextPlugin('stylesheets/[name].css');
2017-07-05 21:08:51 +08:00
2017-07-05 19:31:50 +08:00
module.exports = {
2017-07-06 13:04:14 +08:00
// plugins: ['react', 'es6', 'antd'],
plugins: ['react', 'qunar', 'es6'],
2017-07-05 19:31:50 +08:00
devtool: 'cheap-source-map',
config: {
exports: [
2017-07-05 21:08:51 +08:00
'./index.js'
2017-07-05 19:31:50 +08:00
],
modifyWebpackConfig: function(baseConfig) {
2017-07-05 21:08:51 +08:00
baseConfig.context = path.resolve(__dirname, "client");
2017-07-06 13:04:14 +08:00
baseConfig.watch = true;
2017-07-05 19:31:50 +08:00
return baseConfig;
}
},
2017-07-06 01:09:33 +08:00
// server: {
// hot: true, // true/false默认 false效果相当于 ykit server --hot
// overlay: true // true/false默认 false开启后可在当前打开的页面提示打包错误
// },
2017-07-05 19:31:50 +08:00
hooks: {},
commands: []
};