I have imported my css file to main.js which is the entry file for webpack.
require('../css/main.css');
And I installed style&css loaders.
module: {
loaders: [
{test: /\.css$/, loader: "style!css"}
]
},
style-loader and webpack already have loader-utils package under their node_modules folder but it still cant find this module?
ERROR in Cannot find module 'loader-utils' @ ./public/css/main.css 4:14-78
Just do npm i loader-utils. That's what worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With