postcss / postcss-simple-vars

PostCSS plugin for Sass-like variables
MIT License
415 stars 36 forks source link

Possible to use named ES6 exports? #47

Closed kevinSuttle closed 8 years ago

kevinSuttle commented 8 years ago

See https://github.com/pascalduez/postcss-map/issues/76 for example.

ai commented 8 years ago

Sorry, the idea of ES named exports is to have control for imports. So if you want use a names from JS files, you should use export default { name: 1 }

kevinSuttle commented 8 years ago

So it's just exporting an anonymous object, then importing via:

import name from 'Vars' ?

ai commented 8 years ago

Yeap. I think it is the most ES6-ish way.