webpack-plugin-serve icon indicating copy to clipboard operation
webpack-plugin-serve copied to clipboard

Preserve immutability for options.historyFallback

Open constgen opened this issue 4 years ago • 2 comments

Fixes https://github.com/shellscape/webpack-plugin-serve/issues/235

This PR contains:

  • [x] bugfix
  • [ ] feature
  • [ ] refactor
  • [ ] tests
  • [ ] documentation
  • [ ] metadata

Breaking Changes?

  • [ ] yes
  • [x] no

If yes, please describe the breakage.

Please Describe Your Changes

Resolves problems with DefinePlugin which throws warnings because some variables are changed between rebuilds. The reason is that 3rd party middleware mutates options object passed to it.

constgen avatar Jan 13 '22 17:01 constgen

Can't realize how to test Webpack output. Are there any tests like this for a reference?

constgen avatar Jan 13 '22 17:01 constgen

I think can test that options passed to the plugin are not mutated at all

constgen avatar Jan 13 '22 17:01 constgen