Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Enable Prefresh by Default #1772

Merged
merged 3 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -59,7 +59,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
20 changes: 10 additions & 10 deletions packages/cli/tests/images/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ exports.default = {
'ssr-build/ssr-bundle.css': 2346,
'ssr-build/ssr-bundle.css.map': 3603,

'bundle.448c6.js': 21563,
'bundle.448c6.js.map': 86009,
'bundle.448c6.legacy.js': 22586,
'bundle.448c6.legacy.js.map': 107151,
'bundle.5be14.js': 21563,
'bundle.5be14.js.map': 86009,
'bundle.5be14.legacy.js': 22586,
'bundle.5be14.legacy.js.map': 107151,
'bundle.6329a.css': 1173,
'bundle.6329a.css.map': 2165,

Expand All @@ -32,12 +32,12 @@ exports.default = {
'preact_prerender_data.json': 11,
'asset-manifest.json': 1686,

'route-home.chunk.45dcd.js': 1179,
'route-home.chunk.45dcd.js.map': 3814,
'route-home.chunk.45dcd.legacy.js': 1222,
'route-home.chunk.45dcd.legacy.js.map': 4452,
'route-home.chunk.b1385.css': 838,
'route-home.chunk.b1385.css.map': 1406,
'route-home.chunk.e8f16.js': 1179,
'route-home.chunk.e8f16.js.map': 3814,
'route-home.chunk.e8f16.legacy.js': 1222,
'route-home.chunk.e8f16.legacy.js.map': 4452,
'route-home.chunk.d116e.css': 838,
'route-home.chunk.d116e.css.map': 1406,

'route-profile.chunk.7a48e.js': 3165,
'route-profile.chunk.7a48e.js.map': 12464,
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