ngx-filepond
ngx-filepond copied to clipboard
[Feature] Prepare for ivy distribution
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your feature request related to a problem? Please describe.
Angular 14 now encourages to publish libraries as ivy distribution. This speeds up the build time for packages.
Describe the solution you'd like
Here's some guides that could help:
- https://blog.angular.io/upcoming-improvements-to-angular-library-distribution-76c02f782aa4
- https://angular.io/guide/creating-libraries#getting-started
- https://github.com/angular/ngcc-validation
Describe alternatives you've considered
No alternatives
Thanks! I'm going to look into it.
With Angular 16 Angular Compatibility Compiler (ngcc) will be removed and as a result ngx-filepond will no longer work.
I've just published 6.0.2 which should solve the issue, let me know if I need to make any further modifications.
Hi Rik! Thanks for your effort, will give it a try soon.
Hej Rik! 6.0.3 still generates this warning:
⠙ Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries:
- ngx-filepond [es2015/esm2015] (https://github.com/pqina/ngx-filepond.git) Encourage the library authors to publish an Ivy distribution.
So ngx-filepond won't work with Angular 16.
I forked the repository and build a working example for Ivy / Angular 16.0 here. Hope this helps.
@VeitWeber Thanks, is this done with Angular CLI? → https://angular.io/guide/creating-libraries#getting-started
@VeitWeber Thanks, is this done with Angular CLI? → https://angular.io/guide/creating-libraries#getting-started
Yes!
Thanks 🙏 I'll create a new version following your example 👍
@VeitWeber Tried to get it to work but while the ngx-filepond library is building correctly it's not working in an actual app. Not sure why :/
@rikschennink I would like to take a look at it, is there a branch for testing?
@VeitWeber https://github.com/pqina/ngx-filepond/tree/feature/ivy-distribution
Tried to create a new demo project with Angular CLI but while it doesn't show any errors it doesn't load FilePond.
The demo app will work if you add preserveSymlinks=true to it's tsconfig.json. AFAIK this is needed if the library is installed locally into the package.json and should not be required if you distribute it with npmjs.com. But maybe it depends on the Filepond main lib and is required for apps that use the Ivy build of ngx-filepond and it needs do be documented in the readme.md.
@VeitWeber Aha! I only read that it should be added to angular.json, now it works. 🎉
@VeitWeber Last question before I merge and publish. I'm wondering which versions of Angular work with this new build? Is it just 15.x or earlier as well? I apologise for asking but I'm just super out of the Angular loop.
It think it will run on Angular >= 14.0.0
If you need some help to maintain the lib I would love to help :).
@VeitWeber appreciate it, always welcome.
I've just published new release set version to 7
Works great.
So glad to hear that, I'll close this issue then. :)
I've just published new release set version to 7
Thank you @rikschennink and @VeitWeber! 🙂