Skip to content

Commit

Permalink
Refactor: Enable Prefresh by Default (#1772)
Browse files Browse the repository at this point in the history
* refactor: Enables HMR via Prefresh by default

* docs: Adding changeset

* test: Updating tests to reflect changes to templates
  • Loading branch information
rschristian committed Jan 11, 2023
1 parent 4373718 commit 74192e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lucky-lizards-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'preact-cli': major
---

HMR / the `--refresh` flag is now enabled by default in dev mode.
2 changes: 1 addition & 1 deletion packages/cli/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")'
Expand Down
1 change: 1 addition & 0 deletions packages/create-cli/tests/images/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 74192e9

Please sign in to comment.