diff --git a/Vagrantfile b/Vagrantfile index d06a339f48..053abdd3dd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -121,6 +121,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end config.vm.network "forwarded_port", guest: 9991, host: host_port, host_ip: host_ip_addr + config.vm.network "forwarded_port", guest: 9994, host: host_port + 3, host_ip: host_ip_addr # Specify LXC provider before VirtualBox provider so it's preferred. config.vm.provider "lxc" do |lxc| if command? "lxc-ls" diff --git a/tools/webpack b/tools/webpack index 44ecbd598a..5172622a0a 100755 --- a/tools/webpack +++ b/tools/webpack @@ -29,7 +29,16 @@ def run_watch(host, port, minify, disable_host_check): # type: (str, str, bool, bool) -> None """watches and rebuilds on changes, serving files from memory via webpack-dev-server""" webpack_args = ['node', 'node_modules/.bin/webpack-dev-server'] - webpack_args += ['--config', 'tools/webpack.config.ts', '--port', port, "--host", host] + webpack_args += [ + '--config', + 'tools/webpack.config.ts', + '--host', host, + '--port', port, + # We add the hot flag using the cli because it takes care + # of addition to entry points and adding the plugin + # automatically + '--hot' + ] if minify: webpack_args.append('--optimize-minimize') if disable_host_check: diff --git a/tools/webpack.config.ts b/tools/webpack.config.ts index 0b20c1917f..108a01fd52 100644 --- a/tools/webpack.config.ts +++ b/tools/webpack.config.ts @@ -91,21 +91,16 @@ export default (env?: string) : webpack.Configuration => { new BundleTracker({filename: 'var/webpack-stats-dev.json'}), // Better logging from console for hot reload new webpack.NamedModulesPlugin(), - // Hot Reload of code in development - new webpack.HotModuleReplacementPlugin(), // script-loader should load sourceURL in dev new webpack.LoaderOptionsPlugin({debug: true}), ]; config.devServer = { - clientLogLevel: "warning", - hot: true, - inline: false, - stats: "minimal", + clientLogLevel: "error", + stats: "errors-only", watchOptions: { - aggregateTimeout: 100, - poll: 100, - }, + poll: 100 + } }; } return config;