Adds an automated migration that replaces any usages of the deprecated `ViewEncapsulation.Native` with `ViewEncapsulation.ShadowDom`. PR Close #38882
ViewEncapsulation.Native migration
Automatically migrates usages of ViewEncapsulation.Native to ViewEncapsulation.ShadowDom.
For most practical purposes the Native mode is compatible with the ShadowDom mode.
The migration covers any reference to the Native value that can be traced to @angular/core.
Some examples:
- Inside the
encapsulationproperty ofComponentdecorators. - In property assignments for the
COMPILER_OPTIONSprovider. - In variables.
Before
import { Component, ViewEncapsulation } from '@angular/core';
@Component({
template: '...',
encapsulation: ViewEncapsulation.Native
})
export class App {
}
After
import { Component, ViewEncapsulation } from '@angular/core';
@Component({
template: '...',
encapsulation: ViewEncapsulation.ShadowDom
})
export class App {
}