5 lines
14 KiB
JSON
5 lines
14 KiB
JSON
|
{
|
||
|
"id": "guide/ivy-compatibility",
|
||
|
"title": "Ivy compatibility guide",
|
||
|
"contents": "\n\n\n<div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/aio/content/guide/ivy-compatibility.md?message=docs%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n</div>\n\n\n<div class=\"content\">\n <h1 id=\"ivy-compatibility-guide\">Ivy compatibility guide<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy-compatibility#ivy-compatibility-guide\"><i class=\"material-icons\">link</i></a></h1>\n<p>The Angular team has worked hard to ensure Ivy is as backwards-compatible with the previous rendering engine (\"View Engine\") as possible.\nHowever, in rare cases, minor changes were necessary to ensure that the Angular's behavior was predictable and consistent, correcting issues in the View Engine implementation.\nIn order to smooth the transition, we have provided automated migrations wherever possible so your application and library code is migrated automatically by the CLI.\nThat said, some applications will likely need to apply some manual updates.</p>\n<a id=\"debugging\"></a>\n<h2 id=\"how-to-debug-errors-with-ivy\">How to debug errors with Ivy<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy-compatibility#how-to-debug-errors-with-ivy\"><i class=\"material-icons\">link</i></a></h2>\n<p>If you're seeing errors, first temporarily <a href=\"guide/ivy#opting-out-of-angular-ivy\">turn off Ivy</a> in your <code>tsconfig.json</code> and re-start your app.</p>\n<p>If you're still seeing the errors, they are not specific to Ivy. In this case, you may want to consult the <a href=\"guide/updating-to-version-11\">general update guide</a>. If you've opted into any of the new, stricter type-checking settings, you may also want to check out the <a href=\"guide/template-typecheck\">template type-checking guide</a>.</p>\n<p>If the errors are gone, switch back to Ivy by removing the changes to the <code>tsconfig.json</code> and review the list of expected changes below.</p>\n<a id=\"payload-size-debugging\"></a>\n<h3 id=\"payload-size-debugging\">Payload size debugging<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy-compatibility#payload-size-debugging\"><i class=\"material-icons\">link</i></a></h3>\n<p>If you notice that the size of your application's main bundle has increased with Ivy, you may want to check the following:</p>\n<ol>\n<li>\n<p>Verify that the components and <code>NgModules</code> that you want to be lazy loaded are only imported in lazy modules.\nAnything that you import outside lazy modules can end up in the main bundle.\nSee more details in the original issue <a href=\"https://github.com/angular/angular-cli/issues/16146#issuecomment-557559287\">here</a>.</p>\n</li>\n<li>\n<p>Check that imported libraries have been marked side-effect-free.\nIf your app imports from shared libraries that are meant to be free from side effects, add \"sideEffects\": false to their <code>package.json</code>.\nThis will ensure that the libraries will be properly tree-shaken if they are imported but not directly referenced.\nSee more details in the original issue <a href=\"https://github.com/angular/angular-cli/issues/16799#issuecomment-580912090\">here</a>.</p>\n</li>\n<li>\n<p>Projects not using Angular CLI will see a significant size regression unless they update their minifier settings and set compile-time constants <code>ngDevMode</code>, <code>ngI18nClosureMode</code> and <code>ngJitMode</code> to <code>false</code> (for Terser, please set these to <code>false</code> via <a href=\"https://terser.org/docs/api-reference.html#conditional-compilation\"><code>global_defs</code> config option</a>).\nPlease note that these constants are not meant to be used by 3rd party library or application code as they are not part of our public api surface and might change in the future.</p>\n</li>\n</ol>\n<a id=\"common-changes\"></a>\n<h3 id=\"changes-you-may
|
||
|
}
|