phantomCoder
phantomCoder

Reputation: 1587

What is the best way to use stylesheets with webpack?

I am using nodejs + webpack. What is the best way to use stylesheet with webpack? I don't want to link the css file directly in my index.html even though it works.

Upvotes: 0

Views: 86

Answers (2)

Pranesh Ravi
Pranesh Ravi

Reputation: 19113

You should try html webpack plugin

This plugin will generate index.html and adds all required scripts and stylesheets generated by webpack.

Hope this helps!

Upvotes: 1

Sean Larkin
Sean Larkin

Reputation: 6420

Here is a great relevant guide to using css with webpack from our new docs page. I believe using css-loader (with style-loader), should answer this for you.

Upvotes: 2

Related Questions