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

Support ES6 module loading #6

Open
dpilafian opened this issue Jan 5, 2021 · 1 comment
Open

Support ES6 module loading #6

dpilafian opened this issue Jan 5, 2021 · 1 comment

Comments

@dpilafian
Copy link

dpilafian commented Jan 5, 2021

Add an ES6 module version of ip-range-check to prevent messages like:

WARNING in component.ts depends on 'ip-range-check'. CommonJS or AMD dependencies can
cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Maybe create an additional .js file containing lines similar to:

import { ipaddr } from 'ipaddr.js';
...
export { checkManyCidrs };

Or maybe create a /dist folder with both the CommonJS and ESM versions plus the .d.ts declaration file.

@danielcompton
Copy link
Owner

I have no strong feelings (or knowledge) about how this should be done. Happy to take a PR with whatever you think is best.

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