Skip to content
Permalink
Browse files

configure webpack-dev-server

  • Loading branch information...
nicoqh committed Jun 3, 2019
1 parent 82190d7 commit 163c8b5405419cfa995e1b02b712017e31d89ada
Showing with 25 additions and 0 deletions.
  1. +25 −0 webpack.config.js
@@ -23,6 +23,31 @@ module.exports = env => {
// https://webpack.js.org/configuration/mode
mode: environment,

// Configuration options for Webpack DevServer, an Express web server that
// aids with development. It provides live reloading out of the box and can
// be configured to do a lot more.
devServer: {
// The dev server will serve content from this directory.
contentBase: PATH_DIST,

// Specify a host. (Defaults to 'localhost'.)
host: 'localhost',

// Specify a port number on which to listen for requests.
port: 8080,

// When using the HTML5 History API (you'll probably do this with React
// later), index.html should be served in place of 404 responses.
historyApiFallback: true,

// Show a full-screen overlay in the browser when there are compiler
// errors or warnings.
overlay: {
errors: true,
warnings: true,
},
},

// The point or points to enter the application. This is where Webpack will
// start. We generally have one entry point per HTML page. For single-page
// applications, this means one entry point. For traditional multi-page apps,

0 comments on commit 163c8b5

Please sign in to comment.
You can’t perform that action at this time.