Do you want to request a feature or report a bug?
bug
What is the current behavior?
A sw.js file is still generated when --service-worker=false is passed.
If the current behavior is a bug, please provide the steps to reproduce.
Run build with --service-worker=false
What is the expected behavior?
A sw.js file will not be generated.
Please mention other relevant information.
yeah currently the way it works is it simply does not register it anymore. but yes this can be improved
Honestly, it should create one but unregister. Serviceworkers are great, found this during my testing before :).
Correct. It will still create the sw.js file but it will not be attached to the app. @joshuataylor Your suggestion would need to fall under a new flag since there's a difference between "I don't need a SW" vs "I need to remove all past SWs" 馃憤
@developit any thoughts on how to handle this?
We can check if we get env args in webpack config, then we can stop emitting the sw
Most helpful comment
Correct. It will still create the
sw.jsfile but it will not be attached to the app. @joshuataylor Your suggestion would need to fall under a new flag since there's a difference between "I don't need a SW" vs "I need to remove all past SWs" 馃憤