Rails Webpacker 3.0 import CSS file is not working : <p>I am working Rails5 project with Webpacker in order to run React properly</p>

<p>But when <code>import</code> my css file inside my root component seems it is not working at all. Looking like stylesheet is not coming at all.</p>

<p>This is my root Component</p>

<pre><code>import React from 'react'
import ReactDOM from 'react-dom'
import StartForm from './insurance_form/start_form'
//import PropTypes from 'prop-types'

import 'react-datepicker/dist/react-datepicker.css';
// not working

ReactDOM.render(
  &lt;StartForm /&gt;,
  document.getElementById('start-form-index-container')
)
</code></pre>

<p>This my <code>webpack/environment.js</code></p>

<pre><code>const { environment } = require('@rails/webpacker')

const merge = require('webpack-merge')
const myCssLoaderOptions = {
    modules: true,
    sourceMap: true,
    localIdentName: '[name]__[local]___[hash:base64:5]'
}

const CSSLoader = environment.loaders.get('style').use.find(el =&gt; el.loader === 'css-loader')

CSSLoader.options = merge(CSSLoader.options, myCssLoaderOptions)

module.exports = environment
</code></pre>

<p>So how i can make imported css working well with webpacker?</p>

<p>Thanks!</p>
