Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Require the css file of a package using webpack

Recently I found myself want­ing to use the react-select pack­age and real­ized that I need to include the css that was present in its dist folder.

My appli­ca­tion is setup to use web­pack along with web­pack the mod­ule load­ers — css-loader and style-loader.

In order to directly use a file located at
node_modules/react-select/dist/react-select.css, I added the fol­low­ing line to my own application’s app.css file


@import url('~react-select/dist/react-select.css');

... All my other css

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...