优化package.json

This commit is contained in:
waliang.wang 2017-07-06 14:25:52 +08:00
parent 6ee42322b0
commit cdd6f860f9
3 changed files with 22 additions and 27 deletions

View File

@ -1,3 +1,4 @@
@import '~antd/dist/antd.css';
html {
body {
border: 1px #f00 solid;

View File

@ -28,9 +28,7 @@
"mongoose-auto-increment": "^5.0.1",
"node-sass-china": "^4.5.0",
"ykit-config-antd": "^0.1.3",
"ykit-config-es6": "^0.4.0",
"ykit-config-react": "^0.4.4",
"ykit-config-yo": "^1.3.0"
"ykit-config-react": "^0.4.4"
},
"devDependencies": {
"axios": "^0.16.2",
@ -57,8 +55,6 @@
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-watch": "^4.3.11",
"less": "^2.7.2",
"less-loader": "^4.0.4",
"node-sass": "^4.5.3",
"nodemon": "^1.11.0",
"prop-types": "^15.5.10",
@ -72,8 +68,6 @@
"scss-loader": "0.0.1",
"style-loader": "^0.18.2",
"webpack": "^2.0.0",
"webpack-dev-middleware": "^1.11.0",
"webpack-dev-server": "^2.5.0",
"webpack-node-externals": "^1.6.0"
},
"engines": {

40
ykit.js
View File

@ -1,25 +1,25 @@
var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
// var extractCSS = new ExtractTextPlugin('stylesheets/[name].css');
module.exports = {
// plugins: ['react', 'es6', 'antd'],
plugins: ['react', 'qunar', 'es6'],
devtool: 'cheap-source-map',
config: {
exports: [
'./index.js'
],
modifyWebpackConfig: function(baseConfig) {
baseConfig.context = path.resolve(__dirname, "client");
baseConfig.watch = true;
return baseConfig;
}
},
// server: {
// hot: true, // true/false默认 false效果相当于 ykit server --hot
// overlay: true // true/false默认 false开启后可在当前打开的页面提示打包错误
// },
hooks: {},
commands: []
plugins: ['qunar', 'antd'],
devtool: 'cheap-source-map',
config: {
exports: [
'./index.js'
],
modifyWebpackConfig: function(baseConfig) {
baseConfig.context = path.resolve(__dirname, "client");
baseConfig.watch = true;
return baseConfig;
}
},
server: {
// true/false默认 false效果相当于 ykit server --hot
hot: true,
// true/false默认 false开启后可在当前打开的页面提示打包错误
overlay: true
},
hooks: {},
commands: []
};