mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(platform-server): decouple server from animations module (#59762)
Removes the hard dependency between `platform-server` and `platform-browser/animations` since now the animations module will disable itself automatically. PR Close #59762
This commit is contained in:
committed by
Alex Rickabaugh
parent
e6cb411e43
commit
fc5d187da5
@@ -15,13 +15,11 @@ ng_module(
|
||||
),
|
||||
deps = [
|
||||
":bundled_domino_lib",
|
||||
"//packages/animations/browser",
|
||||
"//packages/common",
|
||||
"//packages/common/http",
|
||||
"//packages/compiler",
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
"//packages/zone.js/lib:zone_d_ts",
|
||||
"@npm//@types/node",
|
||||
"@npm//rxjs",
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/animations": "0.0.0-PLACEHOLDER",
|
||||
"@angular/common": "0.0.0-PLACEHOLDER",
|
||||
"@angular/compiler": "0.0.0-PLACEHOLDER",
|
||||
"@angular/core": "0.0.0-PLACEHOLDER",
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';
|
||||
import {provideNoopAnimations} from '@angular/platform-browser/animations';
|
||||
|
||||
import {PLATFORM_SERVER_PROVIDERS} from './server';
|
||||
|
||||
@@ -31,5 +30,5 @@ export function provideServerRendering(): EnvironmentProviders {
|
||||
globalThis['ngServerMode'] = true;
|
||||
}
|
||||
|
||||
return makeEnvironmentProviders([provideNoopAnimations(), ...PLATFORM_SERVER_PROVIDERS]);
|
||||
return makeEnvironmentProviders([...PLATFORM_SERVER_PROVIDERS]);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ import {
|
||||
EVENT_MANAGER_PLUGINS,
|
||||
ɵBrowserDomAdapter as BrowserDomAdapter,
|
||||
} from '@angular/platform-browser';
|
||||
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
|
||||
|
||||
import {DominoAdapter, parseDocument} from './domino_adapter';
|
||||
import {SERVER_HTTP_PROVIDERS} from './http';
|
||||
@@ -90,7 +89,6 @@ export const PLATFORM_SERVER_PROVIDERS: Provider[] = [
|
||||
*/
|
||||
@NgModule({
|
||||
exports: [BrowserModule],
|
||||
imports: [NoopAnimationsModule],
|
||||
providers: PLATFORM_SERVER_PROVIDERS,
|
||||
})
|
||||
export class ServerModule {}
|
||||
|
||||
@@ -10,7 +10,6 @@ ng_module(
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/platform-browser-dynamic/testing",
|
||||
"//packages/platform-browser/animations",
|
||||
"//packages/platform-server",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
BrowserDynamicTestingModule,
|
||||
ɵplatformCoreDynamicTesting as platformCoreDynamicTesting,
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
|
||||
import {
|
||||
ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS,
|
||||
ɵSERVER_RENDER_PROVIDERS as SERVER_RENDER_PROVIDERS,
|
||||
@@ -35,7 +34,6 @@ export const platformServerTesting = createPlatformFactory(
|
||||
*/
|
||||
@NgModule({
|
||||
exports: [BrowserDynamicTestingModule],
|
||||
imports: [NoopAnimationsModule],
|
||||
providers: SERVER_RENDER_PROVIDERS,
|
||||
})
|
||||
export class ServerTestingModule {}
|
||||
|
||||
Reference in New Issue
Block a user