Add polyfill to Angular library

Discussão em 'Angular' iniciado por Sam Herrmann, Fevereiro 28, 2025.

  1. Sam Herrmann

    Sam Herrmann Guest

    Is there a way within an Angular CLI project to have a library provide a polyfill? Within angular.json, the main app is by default configured with "polyfills": "src/polyfills.ts". This option is not available for a library project.

    My specific use case is that my library has a dependency that requires a polyfill. Without the ability of the library automatically providing the polyfill upon it being imported in an application, I need to document and inform the library user of adding the polyfill themselves.

    Continue reading...

Compartilhe esta Página