This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thecontentBase
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:https://webpack.js.org/configuration/dev-server/#devserver-contentbase
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 towebpack-dev-server
.