Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Merge provided dev option with default #28

Closed
1 of 3 tasks
billyjanitsch opened this issue Mar 1, 2018 · 1 comment
Closed
1 of 3 tasks

Merge provided dev option with default #28

billyjanitsch opened this issue Mar 1, 2018 · 1 comment

Comments

@billyjanitsch
Copy link
Contributor

  • Operating System: macOS 10.13.3
  • Node Version: 8.9.4
  • NPM Version: 5.7.1
  • webpack Version: 4.0.1
  • webpack-serve Version: 0.1.5

This issue is for a:

  • bug
  • feature request
  • modification request

Code

CLI Command
  $ webpack-serve
webpack.config.js
{
  serve: {
    dev: {logLevel: 'warn'},
  },
}

Expected Behavior

Currently, the dev option defaults to {publicPath: '/'}. I was expecting that if I provided my own dev config object, it would be merged with the default one. In other words, if I only provide logLevel, I expected publicPath to still be /.

Would you consider making this behavioral change? I would be happy to PR it.

Actual Behavior

The provided object is not merged with the default one, so changing the log level of the dev server removes the default publicPath config.

New Feature Use Case

Shown above -- tweaking an unrelated setting without affecting the defaults.

(P.S. thanks for this library! ❤️)

@shellscape
Copy link
Contributor

Thanks for the PR 🍺 You'll see a fix commit pop up in this thread any second now. Feel free to put together PRs in the future, we love those! (I just happened to be cranking away on this when you made that issue)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants