-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature request: import globbing #17
Comments
Not really, no, since it uses the exact same import algorithm as Node.js modules use, which does not have import globs. Also, in my experience, import globs in CSS are an anti-pattern, because the ordering of the imports is not well defined. In CSS the order that the files are imported is very important for determining the priority of conflicting properties. When specifically listing each file it is obvious where they will occur in the output. |
I know what you're saying, but disagree about it being anti-pattern. If you're writing really modularized css, the import order often really doesn't matter. In addition, if you're writing your css with each component/module as their own file, not having globbing can get pretty tedious. Since
If I were to work on a plugin for this, would suggest making it standalone, or a fork of |
If you make a clean implementation of it while still using the Node.js module resolution algorithm, I would be willing to merge it into this project. But it probably would need to use a fork of resolve, which is what we use to resolve the module path. |
Cool, I'll work on it! Thanks for the help. |
In transitioning to Rework from Sass, one thing I am missing is the ability to do import globbing (https://github.com/chriseppstein/sass-globbing).
Is this something that could reasonably be added to
rework-npm
?The text was updated successfully, but these errors were encountered: