module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
{ loader: ['style-loader'](/loaders/style-loader) },
{
loader: ['css-loader'](/loaders/css-loader),
options: {
modules: true
}
},
{ loader: ['sass-loader'](/loaders/sass-loader) }
]
}
]
}
};
What does the following line do?
{ loader: ['style-loader'](/loaders/style-loader) },
I pasted it into the console and it's giving me errors and I am not familiar with this kind of syntax in js. AFAIK, webpack configuration should be valid js.