Sha256: 1c00a5ddf2d38d5e4f6d3b34d02034999d69b9ccba1b755d7b2116a61bd7cd93
Contents?: true
Size: 879 Bytes
Versions: 39
Compression:
Stored size: 879 Bytes
Contents
require "webpacker/configuration" require "fileutils" replace_babel_config = FileUtils.compare_file(Rails.root.join("babel.config.js"), "#{__dir__}/config/babel.config.js") say "Copying babel.config.js to app root directory" copy_file "#{__dir__}/examples/react/babel.config.js", "babel.config.js", force: replace_babel_config say "Copying react example entry file to #{Webpacker.config.source_entry_path}" copy_file "#{__dir__}/examples/react/hello_react.jsx", "#{Webpacker.config.source_entry_path}/hello_react.jsx" say "Updating webpack paths to include .jsx file extension" insert_into_file Webpacker.config.config_path, "- .jsx\n".indent(4), after: /\s+extensions:\n/ say "Installing all react dependencies" run "yarn add react react-dom @babel/preset-react prop-types babel-plugin-transform-react-remove-prop-types" say "Webpacker now supports react.js 🎉", :green
Version data entries
39 entries across 39 versions & 3 rubygems