diff --git a/.changeset/lucky-hairs-lie.md b/.changeset/lucky-hairs-lie.md new file mode 100644 index 000000000..296f2206a --- /dev/null +++ b/.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. diff --git a/packages/cli/lib/commands/watch.js b/packages/cli/lib/commands/watch.js index 0ccc6dcdd..f7c49f113 100644 --- a/packages/cli/lib/commands/watch.js +++ b/packages/cli/lib/commands/watch.js @@ -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;