Skip to content

Commit

Permalink
Fix/sw watch coercion (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Oct 12, 2021
1 parent d7e4fe6 commit e42a61c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lucky-hairs-lie.md
@@ -0,0 +1,5 @@
---
'preact-cli': patch
---

Reverts automatic conversion of `--sw` flag in dev to a boolean, which stopped the debug service worker from attaching.
4 changes: 3 additions & 1 deletion packages/cli/lib/commands/watch.js
Expand Up @@ -101,7 +101,9 @@ async function command(src, argv) {
}
argv.src = src || argv.src;
argv.production = false;
argv.sw = toBool(argv.sw);
if (argv.sw) {
argv.sw = toBool(argv.sw);
}

if (argv.https || process.env.HTTPS) {
let { key, cert, cacert } = argv;
Expand Down

0 comments on commit e42a61c

Please sign in to comment.