-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service Worker required when disabled in dev #1594
Comments
any chance this works correctly via |
Yes it does ✅ |
Looks like we're not converting the "false" into a boolean in watch mode as we do in build, just passing the string value through. Will try to get a fix together here. |
It also seems the changes in 9f9277b broke the workaround in #955 (comment) for using a ServiceWorker in watch mode. |
@tysonmatanich What doesn't seem to be working? That workaround, as far as I can tell, just matches what's already provided. That exact config should be broken, as using it will result in duplicate plugins being pushed. |
The workaround allows for the custom serviceworker to be used when running with |
Sorry, I don't understand. You can customize the config as-is:
|
**What kind of change does this PR introduce?** Bugfix **Did you add tests for your changes?** No **Summary** Fixes #1594 `preact watch --sw false` passed the value through as a string, rather than coercing to a boolean, which was an oversight. **Does this PR introduce a breaking change?** No
What is the current behaviour?
When running
preact watch --sw false
it still tries to attach a service worker.preact watch
works fine which should defaultsw
to false (https://github.com/preactjs/preact-cli#preact-watch).Steps to Reproduce
.\src\sw.js
preact watch --sw false
What is the expected behaviour?
Build should succeed using same behavior as
preact watch
which defaultssw
tofalse
Please mention any other relevant information
I'm assuming it was introduced in 9f9277b
Environment Info:
The text was updated successfully, but these errors were encountered: