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

ES6 module syntax #66

Closed
scarlac opened this issue Oct 23, 2018 · 0 comments
Closed

ES6 module syntax #66

scarlac opened this issue Oct 23, 2018 · 0 comments

Comments

@scarlac
Copy link

scarlac commented Oct 23, 2018

It'd be great if we could get ES6 module syntax working, so it'd be possible to import this package using:

import { init as initDebugger } from 'electron-debug';

Which doesn't seem possible at the moment because the initialization function is exported via module.exports = function() { ... } and not as any named export.

The best solution would obviously be to import initDebugger from 'electron-debug' but that would break backwards compatibility which I assume we wouldn't want.

The change seems like something that could be made fairly quickly, so let me know if prefer me to submit a PR.

(For completeness, if you try import foo from 'electron-debug'; foo({}) then Webpack will throw a warning.)

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

1 participant