feat(ivy): make Hammer support tree-shakable (#32203)
Currently, it's not possible to tree-shake away the coordination layer between HammerJS and Angular's EventManager. This means that you get the HammerJS support code in your production bundle whether or not you actually use the library. This commit removes the Hammer providers from the default platform_browser providers list and instead provides them as part of a `HammerModule`. Apps on Ivy just need to import the `HammerModule` at root to turn on Hammer support. Otherwise all Hammer code will tree-shake away. View Engine apps will require no change. BREAKING CHANGE Previously, in Ivy applications, Hammer providers were included by default. With this commit, apps that want Hammer support must import `HammerModule` in their root module. PR Close #32203
This commit is contained in:

committed by
Andrew Kushnir

parent
0287b234ea
commit
de8ebbdfd0
@ -60,6 +60,9 @@ export declare class HammerGestureConfig {
|
||||
|
||||
export declare type HammerLoader = () => Promise<void>;
|
||||
|
||||
export declare class HammerModule {
|
||||
}
|
||||
|
||||
export declare function makeStateKey<T = void>(key: string): StateKey<T>;
|
||||
|
||||
export declare class Meta {
|
||||
|
Reference in New Issue
Block a user