Closed jasonkuhrt closed 8 years ago
export default should actually already do what you want, did you try?
export default should actually already do what you want
Do you mean why I am doing export {}
if I already did export default {}
? Because the former is required to support JS2015 Import Destructuring.
I could do import * as cssVendor from 'css-vendor'
but I find this unsatisfactory in part because its not mutually exclusive to supporting the default pattern used in this PR.
export default {bla} should work both, with and without destructuring.
export default {bla} should work both, with and without destructuring.
You're misinformed. Perhaps because you were using babel 5
which itself was incorrect?
this explains a lot.
ok just npm run lint
it and I will merge
Also you could create an exports object to not to duplicate that much:
const exports = {...} export default exports export exports
ok just npm run lint it and I will merge
- [x] Will do.
Also you could create an exports object to not to duplicate that much: export exports
That syntax is not supported, AKA syntax error. It must be in the format of export { a, b, c }
.
merged
@kof Thanks :+1:
As you are using this module, https://github.com/jsstyles/jss/issues/167 mb you are interested in working on that issue ...
If I get some spare time (unlikely) or direct use-cases I'll try and lend a hand! Thanks for the tip.
This PR makes it possible for users to import like so: