Merge branch 'hot-reload' into 'master'

hot reloading for .vue files

Closes #33729

See merge request !12180
This commit is contained in:
Tim Zallmann 2017-06-23 09:09:01 +00:00
commit 9c7bf12356
1 changed files with 4 additions and 0 deletions

View File

@ -241,6 +241,7 @@ if (IS_DEV_SERVER) {
port: DEV_SERVER_PORT,
headers: { 'Access-Control-Allow-Origin': '*' },
stats: 'errors-only',
hot: DEV_SERVER_LIVERELOAD,
inline: DEV_SERVER_LIVERELOAD
};
config.output.publicPath = '//' + DEV_SERVER_HOST + ':' + DEV_SERVER_PORT + config.output.publicPath;
@ -248,6 +249,9 @@ if (IS_DEV_SERVER) {
// watch node_modules for changes if we encounter a missing module compile error
new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules'))
);
if (DEV_SERVER_LIVERELOAD) {
config.plugins.push(new webpack.HotModuleReplacementPlugin());
}
}
if (WEBPACK_REPORT) {