when I use CSS-loader to package CSS, but the CSS modules object return {}. I think I use the right configuration。 here is my WEBPACK
{
test: /\.css$/,
use: [ 'style-loader',
{
loader: "css-loader",
options: {
modules: true
}
}]
}
and I create a index.css
//index.css
@import url("./test.css");
@import url("./fonts.css");
then I use it in index.js
import stycss from './index.css';
console.log(stycss);
but the CSS modules object is returning {}, why? how to fix it?