You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Allow css loaders to specify dependencies on other css files #530
Allow css loaders to specify dependencies on other css files only for extract sorting purposes.
Right now I consider the behavior a bug since every other loader can use imports to any file.
Feature Use Case
I made a small project to demonstrate the goal and the issue of the current behavior.
All explained in the readme.
Reacted by Tom Raviv, Avi Vahl, Nitay Rabinovich, Tal Harel, Danylo Vdovenko, tomermes, Omer Kenet, Alexey Lebedev, RomanYarik, Kieran Williams and 10 more
Hi @sokra we are trying to move from our webpack plugin to a more simplified loader that works with other webpack echo system, and will be forward compatible with webpack@5. any chance that you can take a look?
@tomrav@barak007 css-loader and mini-css-extract-plugin in my roadmap on the next month, sorry a lot of work, but I don't forget about it, if you really need this right now, you can send a PoC, if it is will be good written we will merge this ASAP
Thank you for replying so quickly, I'm not sure we're familiar enough with the required internals to implement this ourselves, perhaps with some guidance we could. Otherwise once you get around to this issue we'd love to help out.
Closed in favor of #555, also there are some solution:
Use CSS modules to avoid such sutiation (especial composition)
Don't rely on CSS order between modules (it can be unsafe in many situation)
Also you can use @import, but it is still not solve the problem with order between modules
Also maybe we will provide an option to control it, but the such sulation is not easy to solve, also you can always make a plugin and implement any order
Activity
barak007 commentedon May 18, 2020
Hi @sokra we are trying to move from our webpack plugin to a more simplified loader that works with other webpack echo system, and will be forward compatible with webpack@5. any chance that you can take a look?
tomrav commentedon Jun 24, 2020
Hi @evilebottnawi, we'd really appreciate it if you could take a look at this issue, it would help us greatly downstream.
alexander-akait commentedon Jun 24, 2020
@tomrav @barak007 css-loader and mini-css-extract-plugin in my roadmap on the next month, sorry a lot of work, but I don't forget about it, if you really need this right now, you can send a PoC, if it is will be good written we will merge this ASAP
tomrav commentedon Jun 24, 2020
Thank you for replying so quickly, I'm not sure we're familiar enough with the required internals to implement this ourselves, perhaps with some guidance we could. Otherwise once you get around to this issue we'd love to help out.
alexander-akait commentedon Feb 18, 2021
Sorry for delay, problem here you use
require('./compA.css')so webpack runs your loader on import again, but you can userequire('!!./compA.css')alexander-akait commentedon Jan 10, 2024
Closed in favor of #555, also there are some solution:
@import, but it is still not solve the problem with order between modulesAlso maybe we will provide an option to control it, but the such sulation is not easy to solve, also you can always make a plugin and implement any order