From 12a91c93207455047abbc058b6a23e7b54aff394 Mon Sep 17 00:00:00 2001 From: Mostafa Ahangarha Date: Sun, 21 Jan 2024 18:53:43 +0330 Subject: [PATCH] Restrict css-minimizer-webpack-plugin version below 6 in the generator css-minimizer-webpack-plugin v6.0.0 requires Node 18+ https://github.com/webpack-contrib/css-minimizer-webpack-plugin/releases/tag/v6.0.0 --- lib/generators/react_on_rails/base_generator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"