modular-css: Resolving wrong file
I’ve been using modular-css with a lot of joy lately, but there’s an issue that keeps popping up: modular-css resolves to different files than I’d expect due to it using node’s file resolving.
In most cases this is definitely the right approach, but in the context of rollup it can lead to confusion. I’m using rollup-plugin-include-paths and rollup-plugin-node-resolve roughly like this:
includePaths({
extensions: ['.css', '.js', '.jsx'],
paths: ['src'],
}),
nodeResolve({
browser: true,
extensions: ['.js', '.json', '.jsx'],
jsnext: true,
}),
The “problem” here is that I’d like to search src before resorting to the regular node lookup. Is there any way that modular-css can be set up in a way that it would fall through the same chain, or is there any way to instruct modular-css to search in another directory first?
Thanks for your hard work so far!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (9 by maintainers)
Commits related to this issue
- feat: Add support for custom resolvers (#249) Fixes #246 — committed to tivac/modular-css by tivac 7 years ago
- refactor: smaller output by using more characters, duh. Inspired by #246 — committed to tivac/modular-css by tivac 7 years ago
When you ask for smart things I’d be silly to ignore it!
It never ceases to amaze me how fast you are implementing all my requests - thanks so much for your efforts mate! If we’re ever around the same place on the globe I’d love to buy you a beer!