-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Do not mutate the config object #1124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dwjft please provide the structure of your options before and after the first run, only then will we know what to look for specifically. |
I mean, you can figure that out by just reading the snippet of code. const config = {};
new WebpackDevServer(compiler, config);
console.log(config);
/**
* output:
* config: {
reportTime: false,
reporter: [Function: defaultReporter],
log: [Function: bound bound consoleCall],
warn: [Function: bound bound consoleCall],
error: [Function: bound bound consoleCall] }
*/ |
@dwjft as reporter you should provide all available info. thanks for the paste, we'll look into what's modifying that and see what we can put in place. |
This is going to land in the |
Code
Expected Behavior
webpack-dev-server
, it should validate the options passed through correctly.webpack-dev-server
, it should validate the options passed through correctly.Actual Behavior
webpack-dev-server
for the first time, thedevServerConfig
is mutated with a bunch of extra fields populated by the dev server itself.webpack-dev-server
, the config object does not pass validation on line33
ofServer.js
because it mutated the config object.For Bugs; How can we reproduce the behavior?
See the code snippets.
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: