vintem vintem - 1 year ago 132
React JSX Question

Using webpack to load CSS files from node modules

I'm trying to use a react component that includes a css file. I'm requiring the component as usual:

var Select = require('react-select');

I'd like to know how can I require the css needed for the component.

I've already tried this:


And this:


And none have worked.

Answer Source
"dependencies": {
    "my-package": "2.0.0"
//Get a relative path to the installed css files:
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download