react-component-gulp-tasks icon indicating copy to clipboard operation
react-component-gulp-tasks copied to clipboard

How to include node_modules css files

Open zhx828 opened this issue 9 years ago • 2 comments

How do you include the these css files into component as dependencies? For past couple days, I was trying to create a react component which based on couple of other react components as well, such as fix-data-table. I couldn't find a way to require css file into project. Am I missing anything here? Thanks so much for the help.

zhx828 avatar Dec 21 '15 18:12 zhx828

Hi, @zhx828 I write a react-component-tools base on this repo and replace Browserify with webpack. you can require css on webpack like this.

import 'bootstrap/dist/css/bootstrap.css';

or in css:

import "~bootstrap/dist/css/bootstrap.css"

luqin avatar Dec 26 '15 15:12 luqin

@luqin Awesome. Thanks. I will definitely take a look.

zhx828 avatar Jan 02 '16 07:01 zhx828