gajus / babel-plugin-react-css-modules

Transforms styleName to className using compile time CSS module resolution.
Other
2.05k stars 162 forks source link

After migrating from react-css-module to babel-plugin-react-css-modules: react-datePicker styling does not work. #260

Closed Bhushankumar-pawar closed 5 years ago

Bhushankumar-pawar commented 5 years ago

Migrated our project from react-CSS-module to babel-plugin-react-CSS-modules: react-datePicker styling does not work as expected.

expected Behaviour:

datePickerExpected

But we got the result without styling:

datePickerIssue

Webpack config.Js

 {
      test: /\.css$/,
      use: [{ 
        loader: "style-loader"
      },{
        loader: miniCssExtractPlugin.loader,
        options: {
          sourceMap: true,
          publicPath: "../"
        }
      }, {
        loader: "css-loader",
        options: {
          importLoaders: 1,
          modules: true,
          localIdentName: '[path]___[name]__[local]___[hash:base64:5]',
          context
        }
      }, {
        loader: "postcss-loader"
      }],
    }
gajus commented 5 years ago

https://github.com/gajus/babel-plugin-react-css-modules/issues/259