Say there's a project like this:
/* a.css */
.red { color: red };
/* b.css */
.main { composes: red from './a.css'; }
and a config roughly like:
module: {
loaders: [
{
test: /a\.css$/,
loader: 'style-loader!css-loader?modules&localIdentName=a--[local]',
},
{
test: /b\.css$/,
loader: 'style-loader!css-loader?modules&localIdentName=b--[local]',
},
]
}
a.css will be processed by b.css' loader config even though it does't match the file test. This results in the equivalent of:
.b--red { color: red; }
.b--main { };
even though I'd expect the output to look like:
.a--red { color: red; }
.b--main { };
Ideally css-loader should webpack.addDependency for css module source dependencies so they get processed with the same set of loaders as the rest of the config and not jus the root file's loader url.
Say there's a project like this:
and a config roughly like:
a.csswill be processed byb.css' loader config even though it does't match the file test. This results in the equivalent of:even though I'd expect the output to look like:
Ideally
css-loadershouldwebpack.addDependencyfor css module source dependencies so they get processed with the same set of loaders as the rest of the config and not jus the root file's loader url.