shellscape / webpack-nano

A teensy, squeaky 🐤 clean Webpack CLI
Mozilla Public License 2.0
236 stars 5 forks source link

Fix wp5 deprecation #22

Closed bebraw closed 4 years ago

bebraw commented 4 years ago

Closes #20.

This PR contains:

Breaking Changes?

If yes, please describe the breakage.

Please Describe Your Changes

I changed the code to remove watch mode from configuration since watching is extracted by earlier logic already. If this isn't done, then webpack 5 will complain because of a faulty check.

There's still Duplicate build detected (28144bc52857f5b168c6) message left but I suspect that might be something else entirely as webpack's watcher was rewritten.

One open question is how to test the change. I could try to set up a separate test with webpack 5 and capture stdin to validate that the warning isn't there anymore for example.

bebraw commented 4 years ago

@shellscape This is good for a look now. I simplified the tests in three instances so that they match both webpack 4 and 5 to avoid complexity of defining specific tests for both though I can still do that. It's still enough to prove the utility works for both like this.