diff --git a/.changeset/lucky-lizards-drive.md b/.changeset/lucky-lizards-drive.md new file mode 100644 index 000000000..331225065 --- /dev/null +++ b/.changeset/lucky-lizards-drive.md @@ -0,0 +1,5 @@ +--- +'preact-cli': major +--- + +HMR / the `--refresh` flag is now enabled by default in dev mode. diff --git a/packages/cli/src/index.js b/packages/cli/src/index.js index e62d50e19..b64617532 100755 --- a/packages/cli/src/index.js +++ b/packages/cli/src/index.js @@ -55,7 +55,7 @@ prog .option('--clear', 'Clears the console when the devServer updates', true) .option('--sw', 'Generate and attach a Service Worker') .option('--babelConfig', 'Path to custom Babel config', '.babelrc') - .option('--refresh', 'Enables experimental prefresh functionality', false) + .option('--refresh', 'Enables HMR with Prefresh', true) .option( '--template', 'Path to custom HTML template (default "src/template.html")' diff --git a/packages/create-cli/tests/images/create.js b/packages/create-cli/tests/images/create.js index aafe85de4..c005114a8 100644 --- a/packages/create-cli/tests/images/create.js +++ b/packages/create-cli/tests/images/create.js @@ -3,6 +3,7 @@ const path = require('path'); exports.default = [ '.gitignore', 'package.json', + 'preact.config.js', 'README.md', 'src/assets/favicon.ico', 'src/assets/icons/android-chrome-192x192.png',