This setting can be handy when using the HTML5 History API index.html page will likely have to be served in place of any 404 responses from the server, specially when developing Single Page Applications.
Please see connect-history-api-fallback for details. Users may also pass an options Object to this property. If true, enables History API Fallback via connect-history-api-fallback. If true, enables compression middleware which serves files with GZip compression. If true, instructs the client not to log anything to the console.
Note: This can be very spammy in the browser console, as there is no way to suppress error messages from the browser when a WebSocket fails to connect. If true, instructs the client to attempt to reconnect all WebSockets when their connects are interrupted, usually as a result of the server being stopped and/or restarted. Values for this option should be one of the following: ws or wss. If set, allows for overriding the WebSocket protocol scheme string, which corresponds to the server protocol scheme by default. Note: We recommend using webpack-nano, a very tiny, very clean webpack CLI.
How to run webpack server install#
Using npm: npm install webpack-nano webpack-plugin-serve -save-dev
How to run webpack server free#
Feel free to open an issue for direction.įor those interested in direct comparisons, please see the Feature Grid for a breakdown of feature comparisons between webpack-plugin-serve and the alternatives. If a feature you've come to expect in an alternative isn't directly available, it's likely easy to implement via middleware. Feature parity with existing solutions is a high priority. In many ways, webpack-plugin-serve stands out from the alternatives. Users may also choose to compile the client script via an appropriately configured Babel webpack loader for use in older browsers. The client scripts in this module require browsers which support async/await.
This module requires an Active LTS Node version (v10.0.0+). Webpack-plugin-serve is an evergreen ? module. Please consider donating if you find this project useful. A Webpack development server in a plugin.īe sure to browse our recipes and peruse the FAQ after reading the documentation below.