react_on_rails_demo_ssr_hmr
react_on_rails_demo_ssr_hmr copied to clipboard
Demonstrate usage of SWC loader
For more info, see https://github.com/shakacode/shakapacker/pull/29
Demonstrates switching existing Shakapacker/Webpacker app to use SWC loader instead of babel loader.
All that is needed:
- Use correct version of Shakapacker (currently pointed at my fork)
- Install
@swc/core
andswc-loader
to package.json dependencies - Add
webpack_loader: swc
towebpacker.yml
configuration - Add custom
config/swc.config.js
to enable fast refresh (not enabled by default in Shakapacker)