Authored by ccbikai(👎🏻🍜)

Merge branch 'feature/webpack2' into release/5.5.1

phantomjs_cdnurl=http://npm.taobao.org/mirrors/phantomjs
... ...
... ... @@ -44,10 +44,11 @@
"passport-sina": "^0.1.0",
"passport-strategy": "^1.0.0",
"passport-weixin": "^0.1.0",
"postcss-sprites": "^4.2.0",
"request": "^2.81.0",
"request-promise": "^3.0.0",
"serve-favicon": "^2.4.0",
"uuid": "^2.0.3",
"uuid": "^3.0.1",
"xml2js": "^0.4.17",
"yoho-express-session": "^2.0.0",
"yoho-node-lib": "=0.2.10",
... ...
... ... @@ -40,7 +40,7 @@ exports.postcssPlugin = (et) => {
hooks: {
onUpdateRule:function(rule, comment, image){
image.spriteUrl += ("?t=" + new Date().getTime());
psprites.updateRule(rule, comment, image);
require('postcss-sprites/lib/core').updateRule(rule, comment, image);
}
}
},
... ... @@ -86,7 +86,7 @@ exports.postcssPlugin = (et) => {
}
}),
require('precss'),
psprites.default(sprites),
(psprites.default || psprites)(sprites),
require('postcss-assets')(assets),
require('postcss-calc'),
require('postcss-pxtorem')({
... ...
... ... @@ -108,6 +108,9 @@ module.exports = (env) => {
vue: 'vue/dist/vue.js'
}
},
stats: {
children: false
},
plugins: [
new ExtractTextPlugin('[name].css'),
new webpack.optimize.CommonsChunkPlugin({
... ... @@ -121,4 +124,4 @@ module.exports = (env) => {
})
]
}
};
\ No newline at end of file
};
... ...
... ... @@ -2,16 +2,15 @@
const path = require('path');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
let baseConfig = require('./webpack.base.config.js');
baseConfig = baseConfig('dev');
baseConfig.devtool = '#inline-source-map';
baseConfig.devtool = '#eval';
baseConfig.output.publicPath = 'http://localhost:5001/';
baseConfig.devServer = {
host: '0.0.0.0',
port: 5001,
contentBase: [path.join(__dirname, '../'), path.join(__dirname, '../bundle/')],
contentBase: [path.join(__dirname, './bundle/'), path.join(__dirname, '../')],
publicPath: baseConfig.output.publicPath,
hot: true,
inline: true,
... ... @@ -19,7 +18,8 @@ baseConfig.devServer = {
// clientLogLevel: 'error',
compress: true,
stats: {
colors: true
colors: true,
children: false
},
headers: {
'Access-Control-Allow-Origin': '*'
... ...
... ... @@ -4,7 +4,6 @@ const path = require('path');
const os = require('os');
const shelljs = require('shelljs');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const UglifyJsParallelPlugin = require('webpack-uglify-parallel');
const config = require('../../package.json');
const distDir = path.join(__dirname, `../dist/${config.name}/${config.version}`);
... ... @@ -24,8 +23,12 @@ baseConfig.plugins.push(
}
}),
new UglifyJsParallelPlugin({
workers: os.cpus().length
workers: os.cpus().length,
compress: {
warnings: false
},
comments: false
})
);
module.exports = baseConfig;
\ No newline at end of file
module.exports = baseConfig;
... ...
... ... @@ -2,7 +2,7 @@
'use strict';
require('plugin/modal.alert');
require('../common');
var yoho = require('js/yoho-app');
var yoho = require('yoho-app');
var tip = require('plugin/tip');
var Game = require('./vip-day/game');
... ...
... ... @@ -2,7 +2,7 @@
'use strict';
require('plugin/modal.alert');
require('../common');
var yoho = require('js/yoho-app');
var yoho = require('yoho-app');
var tip = require('plugin/tip');
var Game = require('./vip-day/game');
... ...
... ... @@ -2,7 +2,7 @@
'use strict';
require('plugin/modal.alert');
require('../common');
var yoho = require('js/yoho-app');
var yoho = require('yoho-app');
var Game = require('./vip-day/game');
window.$ = $;
... ...
... ... @@ -2,7 +2,7 @@
'use strict';
require('plugin/modal.alert');
require('../common');
var yoho = require('js/yoho-app');
var yoho = require('yoho-app');
var Game = require('./vip-day/game');
window.$ = $;
... ...
... ... @@ -5,7 +5,7 @@
*/
var $ = require('yoho-jquery');
require('js/common');
require('common');
module.exports = function(useInRegister, useForBind, useForRelate) {
var $captcha = $('#captcha'),
... ...
require('js/common');
require('common');
require('./login/qr-check');
require('./login/login');
... ...
... ... @@ -9,7 +9,7 @@ var $resendBtn,
mobile, area;
var page;
require('js/common');
require('common');
tip = require('plugin/tip');
checkPoint = require('./smslogin/check-point');
... ...
... ... @@ -14,7 +14,7 @@ var $countrySelect,
var page;
require('js/common');
require('common');
tip = require('plugin/tip');
api = require('./api');
checkPoint = require('./smslogin/check-point');
... ...
... ... @@ -10,7 +10,7 @@ var $eyeBtn,
var page;
require('js/common');
require('common');
tip = require('plugin/tip');
checkPoint = require('./smslogin/check-point');
validatePWD = require('./password-check');
... ...