Skip to content

refactor(@angular/build): use new HMR documentation URL for console message #30365

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

Merged
merged 1 commit into from
May 22, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describeServeBuilder(executeDevServer, DEV_SERVER_BUILDER_INFO, (harness, setupT
setupTarget(harness, {});
});

it('shows message with opt out steps by default', async () => {
it('shows message with documentation by default', async () => {
harness.useTarget('serve', {
...BASE_OPTIONS,
});
Expand All @@ -33,12 +33,12 @@ describeServeBuilder(executeDevServer, DEV_SERVER_BUILDER_INFO, (harness, setupT
);
expect(logs).toContain(
jasmine.objectContaining({
message: jasmine.stringMatching('--no-hmr'),
message: jasmine.stringMatching('angular.dev/hmr'),
}),
);
});

it('shows message with opt out steps when explicitly enabled', async () => {
it('shows message with documentation when explicitly enabled', async () => {
harness.useTarget('serve', {
...BASE_OPTIONS,
hmr: true,
Expand All @@ -54,12 +54,12 @@ describeServeBuilder(executeDevServer, DEV_SERVER_BUILDER_INFO, (harness, setupT
);
expect(logs).toContain(
jasmine.objectContaining({
message: jasmine.stringMatching('--no-hmr'),
message: jasmine.stringMatching('angular.dev/hmr'),
}),
);
});

it('does not show enabled message with opt out steps when explicitly disabled', async () => {
it('does not show enabled message with documentation when explicitly disabled', async () => {
harness.useTarget('serve', {
...BASE_OPTIONS,
hmr: false,
Expand All @@ -75,7 +75,7 @@ describeServeBuilder(executeDevServer, DEV_SERVER_BUILDER_INFO, (harness, setupT
);
expect(logs).not.toContain(
jasmine.objectContaining({
message: jasmine.stringMatching('--no-hmr'),
message: jasmine.stringMatching('angular.dev/hmr'),
}),
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ export async function* serveWithVite(
browserOptions.aot && serverOptions.liveReload && serverOptions.hmr && useComponentTemplateHmr;
if (browserOptions.templateUpdates) {
context.logger.warn(
'Component HMR has been enabled.\n' +
'If you encounter application reload issues, you can manually reload the page to bypass HMR and/or disable this feature with the' +
' `--no-hmr` command line option.\n' +
'Please consider reporting any issues you encounter here: https://github.com/angular/angular-cli/issues\n',
'Component HMR has been enabled, see https://angular.dev/hmr for more info.',
);
}

Expand Down