-
-
Notifications
You must be signed in to change notification settings - Fork 608
@imports not resolving when css-modules enabled #436
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
Comments
@edwinwright Only for
Thx in advance 🙃 |
@michael-ciniawsky Yes, since I logged this, I found that it does work without the It is confusing though. I wouldn't have thought that enabling the module would change the behaviour like this.
|
Yeah :D, we need to take a serious look at the resolver, it should work like you expected 😛
Is this line mandatory for you atm, bc #355 and regardless of that does |
|
@edwinwright @michael-ciniawsky isnt this a result of the request-behaviour used in modules?
I had the same issue, it seems kinda counterintuitive: :global { * { background: url('~assets/my-asset.svg'); } } // works :local { * { background: url('~assets/my-asset.svg'); } } // does not work :local { * { background: url('assets/my-asset.svg'); } } // no tilde here but works That is odd behaviour. Because of this resolving the actual URL is context-sensitive making global variables ala bootstrap-sass (e.g. |
Any update on this? |
Any further improvement on this issue? |
@lcsrinaldi please provide minimum reproducible test repo, thank you! |
@evilebottnawi sorry, I don't know how to provide you with that. Isn't the issue already specified by other comments? |
Hello @michael-ciniawsky @evilebottnawi! @jantimon produced a testable repo in #589. I see that evilebottnawi commented there but the conversation stalled. Can you take another look? I can confirm it's still an issue on the latest 0.28.7. It affects other syntaxes than just the one jantimon demonstrated in his repo. For example, the following also break when modules are enabled: // App.js
import '~normalize.css'; /* App.css */
@import '~normalize.css'; |
webpack-contrib/css-loader#436 I was observing different behavior on Linux than on Darwin.
Close in favor #589 (comment) |
I'm trying to import normalize.css from the
node_modules
directory. When I have the default configuration it works as expected.When I enable css-modules I get a webpack compilation error:
Is this expected behaviour or a bug?
I'm using:
The text was updated successfully, but these errors were encountered: