Support Ivy partial compilation
It would be great if ui-router/core would be updated to support Ivy partial compilation as described in this Angular blog post.
In the codebase I work on, ui-router/core is the only dependency that generates this message during build:
@uirouter/core [module/esm5] (https://github.com/ui-router/core.git)
To us, this isn't just a warning, as we do not use npm, and we encounter this bug: https://github.com/angular/angular-cli/issues/16980
Please also update @uirouter/angularjs since that package still has a very specific dependency on core.
Thank you so much.
I'm also struggling with this issue. Can you please update when it is going to be updated to support Ivy partial compilation?
+1
+1
@christopherthielen @ranihorev @wawyed this repo seems almost like it's not being maintained anymore/abandoned.
Could I please kindly have:
- a rough ETA on whether this is going to be addressed, as Ivy has been out for a long time now and this is the only library I have that is still not using Ivy
- if not an ETA, an assurance/expectation that if I create a PR to fix this, it will be merged?
I'm willing to submit a PR to resolve the problem, but we don't want people to start relying on our fixed fork. Your answer will help me decide if the fork needs to be public/private.
Thanks
@jpike88 I'm happy to review and merge the PR if you create one :)
@jpike88 do you know how Angular Compiler determines what exactly should be compiled with ngcc and what is not? ui-router/core seems not have anything special for angular. It's framework-agnostic. But angular is still trying to compile it anyway. I don't really want to dig into angular compiler sources to understand what causes this package to be compiled, maybe you can point me in the right direction?
It is because of this file: https://github.com/ui-router/core/blob/306f2b3cfb78b8a81fa47bc40511e83c0ac39161/src/index.metadata.json
That is a View Engine manifest file that ngcc detects. It should be removed to stop ngcc from processing the package, or alternatively this package could add an ngcc.config.js file next to package.json:
module.exports = {
entryPoints: {
'.': {
ignore: true
},
}
};
For projects that want to configure this manually, until @uirouter/core is updated, it's also possible to include ngcc.config.json in your own project with the following contents:
module.exports = {
packages: {
'@uirouter/core': {
entryPoints: {
'.': {
ignore: true
},
}
}
}
};
@JoostK Thanks for the explanation. Do you think there is any risk to removing index.metadata.json?
TBH I have no memory of adding that file 5 years ago, heh.
I have no clue, to be honest. View Engine is only potentially relevant for Angular 12 and older, with Ivy having become the default in v9 even. All supported Angular versions are now always Ivy, so removing that file will not have any effect for recent versions.
released in version 6.1.0