When setting the webpack mode to production I expected the serviceWorkerOption to be minified. After running through the code I noticed this only happens when either the minimize option is set or if the NODE_ENV is equal to production. To adhere to the new webpack configuration property, I think this plugin should also minify when the mode is set to production.
[x] Run unit tests to ensure all existing tests are still passing
[ ] Add new passing unit tests to cover the code introduced by your PR
There are no tests for this part of the code sadly.
When setting the webpack mode to
production
I expected theserviceWorkerOption
to be minified. After running through the code I noticed this only happens when either theminimize
option is set or if theNODE_ENV
is equal toproduction
. To adhere to the new webpack configuration property, I think this plugin should also minify when the mode is set toproduction
.