Skip to content

Commit e42a61c

Browse files
authored
Fix/sw watch coercion (#1599)
1 parent d7e4fe6 commit e42a61c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/lucky-hairs-lie.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'preact-cli': patch
3+
---
4+
5+
Reverts automatic conversion of `--sw` flag in dev to a boolean, which stopped the debug service worker from attaching.

packages/cli/lib/commands/watch.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ async function command(src, argv) {
101101
}
102102
argv.src = src || argv.src;
103103
argv.production = false;
104-
argv.sw = toBool(argv.sw);
104+
if (argv.sw) {
105+
argv.sw = toBool(argv.sw);
106+
}
105107

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

0 commit comments

Comments
 (0)