GET 404 (Not Found) 

'webpack-hot-middleware/client webpack in the add reference path configuration entry path=/ __webpack_hmr& timeout=10000& reload=true'?, the relevant parameters should not omit, otherwise it will not automatically refresh problem.

script as follows:

 / / webpack for configuration information of let hotMiddlewareScript ='webpack-hot-middleware/client? Path=/__webpack_hmr& timeout=10000& reload=true', wpConfig = require ('./webpack.config'), to modify the configuration information / / entries = Object.keys (wpConfig.entry) / / add thermal loading information entries.forEach ((key) => wpConfig.entry[key].push (hotMiddlewareScript) {}; / / add) the plugin information if (wpConfig.plugins = = = undefined) {wpConfig.plugins} = [] / / add thermal load plug-in wpConfig.plugins.push (New), webpack.optimize.OccurrenceOrderPlugin (New), webpack.HotModuleReplacementPlugin (New) webpack.NoEmitOnErrorsPlugin (


 main.bundle.js:30 GET 404 (Not Found) 

webpack configuration in publicPath must be an absolute address, detailed configuration as follows:

 module.exports = {/ / / / other configuration information is omitted...... Output: path: {/ / configs.dist, must be an absolute address publicPath:'', filename:'[name].bundle.js', libraryTarget:'var'}

" Access-Control-Allow-Origin' header

 XMLHttpRequest error 3:No cannot load No'Access-Control-Allow-Origin'header is present on the requested resource. Origin'http://localhost' is therefore not allowed access. 

will appear unexpectedly unbelievable, visit AJAX cross domain problem in the local, after careful examination found that the browser localhost and as two different domains, many solutions, only one of the most simple, application access, Try to use the path that is exactly the same with publicPath in webpack configuration, for example, in this paper, the best way to access is to input to access local applications.


 new constructor error error webpack.optimize.OccurenceOrderPlugin (TypeError:), webpack.optimize.OccurenceOrderPlugin is not a constructor at Object.< anonymous> (E:Workspacevue-hotdev-server.js:23:6) at Module._compile (module.js:570:32) at Object.Module._extensions..Js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3

of the common problems in webpack 2, the solution is very simple, OccurenceOrderPlugin Change to OccurrenceOrderPlugin.

webpack compiler has summed up two kinds of thermal load, webpack-dev-server and webpack-hot-middleware, from the webpack 2 webpack-dev-server performance point of view, can fully meet the needs of the development, but the biggest problem is that webpack-dev-server cannot publish service, only in the local access.

or more, this solution based on webpack-hot-middleware thermal loading related errors is the whole content that Xiaobian shared to you. I hope to give you a reference, and I hope you will support the script home more.

you might be interested in this article:

This concludes the body part

This paper fixed link: | Script Home | +Copy Link

Article reprint please specify:Solutions based on webpack-hot-middleware thermal load related errors | Script Home

You may also be interested in these articles!