-1

I am new to webpack.

Can anyone give me a simple explanation of why we do need the css loader? Can't I simply keep adding css file references into html tag?

I could find information only about HOW TO use css loader, but WHY I should use it.

I suspect it can be useful for lazy loading but not sure.

Thanks

Octtavius
  • 563
  • 8
  • 29

1 Answers1

0

Webpack transforms EVERYTHING into js, and everything is considered a module for webpack. You need something to be able to translate/transform that js"css" into useful css.

That is the only reason.

PlayMa256
  • 6,603
  • 2
  • 34
  • 54