Fix browsersync (#1815)
* Update dependencies * Remove monkey-hot-loader * Use webpack-merge instead of util/mergeWithConcat() * Fix: copyglobs plugin `after-emit` is bound twice * NoErrorsPlugin() is deprecated in favor of NoEmitOnErrorsPlugin() * webpack-dev-middleware should use same publicPath as compiler * webpack-hot-middleware/client should be prepended to entries * Browser should refresh when HMR fails * Bootstrap package.json has correct main property Sometime between alpha 2 and 3, package.json was pointing to nonexistent file, so we referenced file manually in our repo. Underlying issue was fixed by alpha 4, so we no longer have to specify full path to file.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
const path = require('path');
|
||||
const argv = require('minimist')(process.argv.slice(2));
|
||||
const uniq = require('lodash/uniq');
|
||||
const merge = require('webpack-merge');
|
||||
|
||||
const mergeWithConcat = require('./util/mergeWithConcat');
|
||||
const userConfig = require('../config');
|
||||
|
||||
const isProduction = !!((argv.env && argv.env.production) || argv.p);
|
||||
@@ -10,7 +10,7 @@ const rootPath = (userConfig.paths && userConfig.paths.root)
|
||||
? userConfig.paths.root
|
||||
: process.cwd();
|
||||
|
||||
const config = mergeWithConcat({
|
||||
const config = merge({
|
||||
copy: 'images/**/*',
|
||||
proxyUrl: 'http://localhost:3000',
|
||||
cacheBusting: '[name]_[hash]',
|
||||
@@ -32,7 +32,7 @@ const config = mergeWithConcat({
|
||||
config.watch.push(`${path.basename(config.paths.assets)}/${config.copy}`);
|
||||
config.watch = uniq(config.watch);
|
||||
|
||||
module.exports = mergeWithConcat(config, {
|
||||
module.exports = merge(config, {
|
||||
env: Object.assign({ production: isProduction, development: !isProduction }, argv.env),
|
||||
publicPath: `${config.publicPath}/${path.basename(config.paths.dist)}/`,
|
||||
manifest: {},
|
||||
|
||||
Reference in New Issue
Block a user