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

Import CSS from other modules? #23

Open
trusktr opened this issue Feb 17, 2015 · 2 comments
Open

Import CSS from other modules? #23

trusktr opened this issue Feb 17, 2015 · 2 comments

Comments

@trusktr
Copy link

trusktr commented Feb 17, 2015

Suppose I do

require('foo/style.css')

where foo is a module in node_modules of my application. This file doesn't get cssified. Is there a way to do this? I tried cssify as a global transform in my application, but that screws with dependencies that have cssify as their own local transform.

@davidguttman
Copy link
Owner

Asked @substack about it. Looks like it needs a bit more thought, but the gist is that it's something that https://github.com/substack/module-deps would need to handle, but npm dedupe could put deps unexpected places. There's also the issue of multiple versions of the same package where one is transformed and the other is not...

@trusktr
Copy link
Author

trusktr commented Feb 18, 2015

Interesting. About having multiple of the same deps, maybe the transform would be applied to the dep of the module that is using the require, so it resolves to it's particular dep. I've no idea how this would work, but I suppose it'd be similar to how nodejs CommonJS gets the correct dep for a module in non-browserify cases.

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

No branches or pull requests

2 participants