kristerkari / react-native-sass-transformer

Use Sass to style your React Native apps.
MIT License
219 stars 19 forks source link

Support for platform specific extension breaks "directories as modules" #17

Closed pierre-elie closed 5 years ago

pierre-elie commented 5 years ago

Consider the following file hierarchy

capture d ecran 2018-10-29 a 18 55 56

Prior to version 1.3.0, @import "uikit/style/common" was correctly resolved, consistent with the node.js resolution: uikit-lib was considered like a module named uikit because of its package.json.

In version 1.3.0, import paths do not include the correct "node.js" resolution of uikit.

(Including package.json in directories other than real modules is useful to avoid relative paths and for Git submodules)

Thanks!

kristerkari commented 5 years ago

Thanks @pierre-elie! I did not even know about this feature.

Would it be possible for you to setup a repository where the issue can be reproduced? That way it would be a lot easier to work on a fix for this.

pierre-elie commented 5 years ago

I'll do that, thanks!

kristerkari commented 5 years ago

@pierre-elie I managed to to reproduce the issue and fix it. Please test v1.3.1 and let me know if the issue is now fixed. :)

pierre-elie commented 5 years ago

I confirmed it's fixed with 1.3.1, thanks a lot 👍

kristerkari commented 5 years ago

Great! Please let me know if you find something else that is not working :)