diff --git a/lib/make_it_so/rails/app_builder.rb b/lib/make_it_so/rails/app_builder.rb index ed2fe46..6e8ffb9 100644 --- a/lib/make_it_so/rails/app_builder.rb +++ b/lib/make_it_so/rails/app_builder.rb @@ -42,7 +42,7 @@ def eliminate_byebug end def react - self.gem 'webpacker', '~> 3.2' + self.gem 'webpacker', '~> 3.3' after_bundle do rake 'webpacker:install' @@ -52,7 +52,7 @@ def react parsed_json = JSON.parse(unparsed_json) modify_json(package_json_file) do |json| - ["dependencies"].each do |key| + ["dependencies", "devDependencies"].each do |key| json[key] ||= {} json[key].merge!(parsed_json[key]) end diff --git a/snippets/rails/react_dependencies.json b/snippets/rails/react_dependencies.json index 03c8728..d535f7a 100644 --- a/snippets/rails/react_dependencies.json +++ b/snippets/rails/react_dependencies.json @@ -1,9 +1,13 @@ { "dependencies": { - "@rails/webpacker": "~3.2.0", + "@rails/webpacker": "~3.3.0", "babel-preset-react": "~6.24.1", "prop-types": "~15.6.0", "react": "~15.4.2", "react-dom": "~15.4.2" + }, + "devDependencies": { + "webpack-cli": "^2.0.10", + "webpack-dev-server": "^2.11.1" } }