0

I'm using the React Starter Kit and want to use an npm module for my css and javascript (namely bootstrap).

How do I integrate it properly? Simply installing it doesn't make it available on the server.

Waog
  • 7,127
  • 5
  • 25
  • 37
  • this may be the solution: http://stackoverflow.com/questions/32686297/webpack-import-bootstrap-js-and-css – Waog Aug 13 '16 at 12:52

1 Answers1

0

To install bootstrap you actually need the npm package called react-bootstrap. So first run

npm install --save react-bootstrap

and then import the components in your app. To have the bootstrap's css and default theme, just include the cdn css files right into your main index.html file as

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap-theme.min.css">

If you want a starter kit that has all the needed packages in order to build rich real-world apps, but with minimal configuration, you can try http://redux-minimal.js.org/

By default redux-minimal comes with bootstrap, sass and a demo app to show you how code looks like. Alternatively you could just check the github code and borrow code that way and stick to your existing starter kit.