Currently, I am working on a React module and have set up a React project to demonstrate the functionality of this module. Initially, everything was working smoothly until I encountered an issue with the webpack configuration related to the CSS loader.
{
test: /\.(css|less)$/,
use: ["style-loader", "css-loader"]
}
Using the above configuration successfully loaded the CSS when importing and using the module in the project. However, when I switched to the following setup,
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader']
})
}
The CSS files were being generated but were not loading in the project. As a newcomer to React, I had followed a tutorial to understand the structure of a React project. Can someone help me identify what mistake I might be making in this scenario?
tutorial