react_on_rails_demo_ssr_hmr icon indicating copy to clipboard operation
react_on_rails_demo_ssr_hmr copied to clipboard

Demonstrate usage of SWC loader

Open tomdracz opened this issue 2 years ago • 0 comments

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 and swc-loader to package.json dependencies
  • Add webpack_loader: swc to webpacker.yml configuration
  • Add custom config/swc.config.js to enable fast refresh (not enabled by default in Shakapacker)

This change is Reviewable

tomdracz avatar Jan 26 '22 16:01 tomdracz