Skip to content Skip to sidebar Skip to footer

Why Would Webpack 4 Minification Prevent Styles For React-select Component?

I have a React project that is bundled by Webpack and served up by react_on_rails. In this project I use the Select component from react-select. Everything works as expected when u

Solution 1:

I found a workaround. I swapped out the default webpack minimizer for the (UglifyJsPlugin)[https://github.com/webpack-contrib/uglifyjs-webpack-plugin] and now everything works as expected.

  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

  optimization: {
    minimizer: [ new UglifyJsPlugin() ],
  }

Post a Comment for "Why Would Webpack 4 Minification Prevent Styles For React-select Component?"