Skip to content

Commit bbb2984

Browse files
committed
Refactor: Enable Prefresh by Default (#1772)
* refactor: Enables HMR via Prefresh by default * docs: Adding changeset * test: Updating tests to reflect changes to templates
1 parent 4832673 commit bbb2984

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.changeset/lucky-lizards-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'preact-cli': major
3+
---
4+
5+
HMR / the `--refresh` flag is now enabled by default in dev mode.

packages/cli/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ prog
5555
.option('--clear', 'Clears the console when the devServer updates', true)
5656
.option('--sw', 'Generate and attach a Service Worker')
5757
.option('--babelConfig', 'Path to custom Babel config', '.babelrc')
58-
.option('--refresh', 'Enables experimental prefresh functionality', false)
58+
.option('--refresh', 'Enables HMR with Prefresh', true)
5959
.option(
6060
'--template',
6161
'Path to custom HTML template (default "src/template.html")'

packages/create-cli/tests/images/create.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const path = require('path');
33
exports.default = [
44
'.gitignore',
55
'package.json',
6+
'preact.config.js',
67
'README.md',
78
'src/assets/favicon.ico',
89
'src/assets/icons/android-chrome-192x192.png',

0 commit comments

Comments
 (0)