lib/install/react.rb in webpacker-1.2 vs lib/install/react.rb in webpacker-2.0
- old
+ new
@@ -17,15 +17,15 @@
else
puts "Copying .babelrc to app root directory"
copy_file "#{__dir__}/examples/react/.babelrc", ".babelrc"
end
-puts "Copying react loader to #{Webpacker::Configuration.config_path}/loaders"
+puts "Copying react loader to config/webpack/loaders"
copy_file "#{__dir__}/config/loaders/installers/react.js", "config/webpack/loaders/react.js"
puts "Copying react example entry file to #{Webpacker::Configuration.entry_path}"
copy_file "#{__dir__}/examples/react/hello_react.jsx", "#{Webpacker::Configuration.entry_path}/hello_react.jsx"
puts "Installing all react dependencies"
-run "./bin/yarn add react react-dom babel-preset-react prop-types"
+run "yarn add react react-dom babel-preset-react prop-types"
puts "Webpacker now supports react.js 🎉"