|
@@ -70,18 +70,24 @@ gulp.task('serve', cb => {
|
|
|
});
|
|
|
|
|
|
gulp.task('dev-server', function() {
|
|
|
+
|
|
|
const server = new WebpackDevServer(bundler, {
|
|
|
contentBase: path.join(__dirname, 'build'),
|
|
|
hot: true,
|
|
|
filename: 'app.js',
|
|
|
- stats: { colors: true },
|
|
|
+ watchOptions: {
|
|
|
+ aggregateTimeout: 300,
|
|
|
+ poll: 400
|
|
|
+ },
|
|
|
+ stats: {
|
|
|
+ colors: true,
|
|
|
+ chunks: false,
|
|
|
+ version: false
|
|
|
+ },
|
|
|
historyApiFallback: true
|
|
|
});
|
|
|
- bundler.watch({
|
|
|
- aggregateTimeout: 300,
|
|
|
- poll: 400
|
|
|
- }, function(err, stats) {
|
|
|
- // actions
|
|
|
+ bundler.plugin('done', () => {
|
|
|
+ console.log('done');// eslint-disable-line no-console
|
|
|
});
|
|
|
server.listen(3000, 'localhost', function (err) {
|
|
|
if (err) { console.log(err); }
|