title: How to import css file for into Component .jsx file
body: <p>I am trying to use the react-day-pickers component like so but I can't figure out how to import the .css file and I keep getting the error:</p>
  
  <pre><code>Module parse failed: 
  
  /Users/qliu/Documents/workspace/AppNexus/pricing_ui/contract-ui/app_contract-ui/node_modules/react-day-picker/lib/style.css Unexpected token (3:0)
  You may need an appropriate loader to handle this file type.
  SyntaxError: Unexpected token (3:0)
  </code></pre>
  
  <p>I have <code>"css-loader": "^0.19.0",</code> in my package.json installed and 
  here is my Calender.jsx file:</p>
  
  <pre><code>import React from "react";
  import DayPicker, { DateUtils } from "react-day-picker";
  
  import "../../../node_modules/react-day-picker/lib/style.css"; // &lt;==== ERROR ON THIS LINE
  
  export default class Calender extends React.Component {
  
    state = {
      selectedDay: null
    };
  
    handleDayClick(e, day, modifiers) {
      if (modifiers.indexOf("disabled") &gt; -1) {
        console.log("User clicked a disabled day.");
        return;
      }
      this.setState({
        selectedDay: day
      });
    }
  
    render() {
  
      // Add the `selected` modifier to the cell of the clicked day
      const modifiers = {
        disabled: DateUtils.isPastDay,
        selected: day =&gt; DateUtils.isSameDay(this.state.selectedDay, day)
      };
  
      return &lt;DayPicker enableOutsideDays modifiers={ modifiers } onDayClick={ this.handleDayClick.bind(this) } /&gt;;
    }
  }
  </code></pre>
  
  <p>and this is my webpack.config.js:</p>
  
  <pre><code>var path = require('path');
  var webpack = require('webpack');
  var settings = require('./src/server/config/settings');
  var LessPluginAutoPrefix = require('less-plugin-autoprefix');
  
  module.exports = {
      devtool: '#source-map',
      resolve: {
          extensions: ['', '.jsx', '.js']
      },
      entry: [
          'webpack-hot-middleware/client',
          './src/client/index.jsx'
      ],
      externals: {
          'react': 'React',
          'react-dom': 'ReactDOM',
  
          // to avoid duplicate import of React with react-addons-css-transition-group
          './React': 'React',
          './ReactDOM': 'ReactDOM',
          config: 'config'
      },
      output: {
          path: path.join(__dirname, 'public'),
          filename: 'bundle.js',
          publicPath: '/'
      },
      plugins: [
          new webpack.HotModuleReplacementPlugin(),
          new webpack.NoErrorsPlugin()
      ],
      lessLoader: {
          lessPlugins: [
              new LessPluginAutoPrefix({ browsers: ['last 2 versions'] })
          ]
      },
      module: {
          loaders: [{
              test: /\.(js|jsx)$/,
              loaders: ['babel'],
              exclude: /node_modules/
          },
          {
              test: /\.less$/,
              loader: 'style!css!less'
          },
          {
              test: /\.json$/,
              loader: 'json-loader'
          }]
      }
  };
  </code></pre>