…nd support Ivy
Steps for testing:
- cd nativescript-angular
- npm run pack
- cd yourProj
- npm i your nativescript-angular tgz
- install `next` versions of all Angular deps
- edit `node_modules/@angular/compiler-cli/src/ngcc/src/packages/dependency_resolver.js` in order to comment out the following code:
// This entry point has dependencies that are missing
// so remove it from the graph.
// removeNodes(entryPoint, Array.from(missing)); <--- this line
- enable Ivy in the tsconfig with:
"angularCompilerOptions": {
"enableIvy": true,
"allowEmptyCodegenFiles": true,
},
- run ./node_modules/.bin/ivy-ngcc
- edit nativescript-angular package.json in order to set `fesm2015/nativescript-angular.js` for both `main` and `module`
- edit `fesm2015/nativescript-angular.js` in order to remove the duplicate `_0_Template`
- edit `fesm2015/nativescript-angular.js` in order to move import { install } from 'tns-core-modules/globals';install(); on the first line
- fix the nativescript-angular imports in your app and the AOT transformer:
- edit `/Users/tachev/Work/Test/ngIvy/node_modules/nativescript-dev-webpack/transformers/ns-replace-bootstrap.js` and set ...transformers_1.insertStarImport(sourceFile, idPlatformNativeScript, 'nativescript-angular', firstNode, true),
- edit your main.ts, app.module.ts and everywhere else in your app in order to import from `nativescript-angular'` instead of the deep imports
- tns run android/ios --bundle --env.ios