grommet / babel-plugin-grommet

Babel plugin to transform member style imports into default imports
Apache License 2.0
4 stars 2 forks source link

Fixed an issue with es6 module sorting #5

Closed ericsoderberghp closed 6 years ago

ericsoderberghp commented 6 years ago

There was an issue where grommet-icons modules were choosing es5 versions whereas grommet was choosing es6 versions. This caused multiple versions of grommet-icons ThemeContext to be loaded, which doesn't work. The reason this happened is because reverse() was being used to put 'es6' before 'components' in grommet but was causing 'icons' to be put before 'es6' in grommet-icons.

The change is to first filter down to matching modules and then sort to use the preferred version based on 'es6' explicitly.

alansouzati commented 6 years ago

well done sir. thanks for finding and fixing this issue