Skip to content

Commit

Permalink
handle webpacker related versioning issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dpickett committed Mar 7, 2018
1 parent f34dce3 commit a00a88c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/make_it_so/rails/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion snippets/rails/react_dependencies.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit a00a88c

Please sign in to comment.