Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular v9 (ivy) compatibility #27

Closed
petebacondarwin opened this issue Nov 14, 2019 · 1 comment
Closed

Angular v9 (ivy) compatibility #27

petebacondarwin opened this issue Nov 14, 2019 · 1 comment

Comments

@petebacondarwin
Copy link

Currently this package cannot be processed correctly by ngcc (Angular's ivy compatibility compiler) because the package.json contains "module": "index.js" property. This means that applications targeting the ivy renderer in Angular 9 (the default) will not be able to use this library.

This property is supposed to be used for ES6 code (i.e. stuff that uses ES modules) but index.js contains CommonJS formatted code.

The "main" property, which also exists in the package.json is the correct one to use for index.js.

Could you remove the "module" property from the published package.json, or update the build to also generate ES6 as well and point this property at that file?


In the meantime projects using this package and targeting ivy can workaround the problem with an `ngcc.config.js file in their project root containing:

module.exports = {
  packages: {
    'angular2-promise-buttons': {
      entryPoints: { '.': { override: { module: undefined } } }
    }
  }
};
@johannesjo
Copy link
Owner

Thank you very much for making me aware of this issue. I'll provide a patch soon.

johannesjo pushed a commit that referenced this issue Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants