ReduxSimpleStarter
ReduxSimpleStarter copied to clipboard
Unable to import external css
I am writing import './styles/index.css';
inside a component file. But its not working. Its showing the following error in the cosole:
yea. that is because ,the webpack has not been configured to see your css file during bundling. to achieve what you are talking about, just visit webpack page and see how to add css loader to your webpack.config.js and everything works fine
@hkedia321 Ensure you should installed style-loader and css-loader as dev dependencies with your project. Update your web config loaders as below:
loaders:[
{
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['react', 'es2015', 'stage-1']
}
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
}
]