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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding support for deduped node modules #21

Merged
merged 3 commits into from
Nov 3, 2015
Merged

Conversation

brodrigu
Copy link
Contributor

@brodrigu brodrigu commented Nov 2, 2015

When using npm3 or when deduping modules such that a given module is moved up the tree to one of its parents node_modules folder, @import statements are failing as the target resource is no longer in the modules local node_modules folder.

@import "node_modules/shared-module/style.css

This improvement will look up the tree and find the first shared-module and use that path to find style.css

@brodrigu
Copy link
Contributor Author

brodrigu commented Nov 3, 2015

ah good call, I'll fix.

@brodrigu
Copy link
Contributor Author

brodrigu commented Nov 3, 2015

myapp/
    node_modules/
        my-shared-module/
            styles.css
        my-module/
            node-modules/
                irrelevant-modules/
                    index.js
            my-file.js //require('my-styles.css');
            my-styles.css //@import "node_modules/my-shared-module/style.css
        my-other-module/
            node-modules/
                foo/
                    index.js
            other-file.js //require('other-styles.css');
            other-styles.css //@import "node_modules/my-shared-module/style.css

cheton added a commit that referenced this pull request Nov 3, 2015
adding support for deduped node modules
@cheton cheton merged commit cc74c5a into cheton:master Nov 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants