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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not exporting as default when there's no need to use destructuring #41

Closed
tripflex opened this issue Oct 23, 2019 · 2 comments
Closed
Labels

Comments

@tripflex
Copy link

@tripflex tripflex commented Oct 23, 2019

First, thank you for all your work on this lib, it is greatly appreciated 馃憤

export { default as VueContext } from './vue-context';

Why not just export this as default instead of making it so that we have to use destructuring to import it?

Reason I ask is if we are doing code splitting it requires more code, when it could just be exported as default since there's nothing else being exported (so even tree shaking wouldn't matter in this situation)
#33 (comment)

This could be both a named export and default export (to maintain backwards compatibility)

@rawilk

This comment has been minimized.

Copy link
Owner

@rawilk rawilk commented Nov 14, 2019

In a release I'm working on, there will be a default export available as well.

See: https://github.com/rawilk/vue-context/tree/release/v5

@rawilk rawilk added the enhancement label Nov 14, 2019
@rawilk

This comment has been minimized.

Copy link
Owner

@rawilk rawilk commented Nov 14, 2019

Version 5.0.0 is available now, which should give you the ability to import a default export instead now.

@rawilk rawilk closed this Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can鈥檛 perform that action at this time.