diff --git a/packages/schematics/angular/server/index.ts b/packages/schematics/angular/server/index.ts index 077114e9027d..8b906f88134e 100644 --- a/packages/schematics/angular/server/index.ts +++ b/packages/schematics/angular/server/index.ts @@ -248,10 +248,7 @@ const serverSchematic: RuleFactory = createProjectSchematic( addRootProvider( options.project, ({ code, external }) => - code`${external('provideClientHydration', '@angular/platform-browser')}(${external( - 'withEventReplay', - '@angular/platform-browser', - )}())`, + code`${external('provideClientHydration', '@angular/platform-browser')}()`, ), ]); }, diff --git a/packages/schematics/angular/server/index_spec.ts b/packages/schematics/angular/server/index_spec.ts index 07b497248675..b54776f9fd54 100644 --- a/packages/schematics/angular/server/index_spec.ts +++ b/packages/schematics/angular/server/index_spec.ts @@ -172,7 +172,7 @@ describe('Server Schematic', () => { it(`should add 'provideClientHydration' to the providers list`, async () => { const tree = await schematicRunner.runSchematic('server', defaultOptions, appTree); const contents = tree.readContent('/projects/bar/src/app/app-module.ts'); - expect(contents).toContain(`provideClientHydration(withEventReplay())`); + expect(contents).toContain(`provideClientHydration()`); }); }); @@ -257,7 +257,7 @@ describe('Server Schematic', () => { it(`should add 'provideClientHydration' to the providers list`, async () => { const tree = await schematicRunner.runSchematic('server', defaultOptions, appTree); const contents = tree.readContent('/projects/bar/src/app/app.config.ts'); - expect(contents).toContain(`provideClientHydration(withEventReplay())`); + expect(contents).toContain(`provideClientHydration()`); }); });