diff --git a/lib/generators/react_on_rails/base_generator.rb b/lib/generators/react_on_rails/base_generator.rb index 996305386..cd7c2f28a 100644 --- a/lib/generators/react_on_rails/base_generator.rb +++ b/lib/generators/react_on_rails/base_generator.rb @@ -91,7 +91,8 @@ def add_yarn_dependencies babel-plugin-macros" puts "Adding CSS handlers" - run "yarn add css-loader css-minimizer-webpack-plugin mini-css-extract-plugin style-loader" + # css-minimizer-webpack-plugin v6.0.0 requires Node 18+ + run "yarn add css-loader 'css-minimizer-webpack-plugin@<6.0.0' mini-css-extract-plugin style-loader" puts "Adding dev dependencies" run "yarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh"