Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
dev-server: Stop setting contentBase #1165
This can cause confusion since when performing a production build,
...and I believe is a leftover from the time when
By default webpack-dev-server attempts to serve webpack-generated files in response to requests, followed by passing them on to any proxy (if set). However when the `contentBase` setting is used, requests can also fall back to any file in the specified directory, even if it's not part of the webpack build. This can cause confusion since when performing a production build, webpack-dev-server isn't used so no such fallback occurs, meaning a seemingly working dev site then might not work in production. The `contentBase` option has been set since Neutrino 4: 30e3f5b#diff-92e7b3255c5e8759497a7b3247b2e1e8R161 ...and I believe is a leftover from the time when `copy-webpack-plugin` (prior to v2.0.1) didn't support making the copied files available to webpack-dev-server.