reactjs/react-rails

`ReactDOM.version?.split` not transpiled?

jdelStrother opened this issue · 3 comments

Steps to reproduce

Use react_ujs without transpiling node_modules, visit a page in an older browser (eg Safari 12)

Expected behavior

Page loads successfully

Actual behavior

Javascript fails to load with SyntaxError: Unexpected token '.'.

System configuration

  • Shakapacker version: 6.6.0
  • React_UJS version: 2.7.0

This is introduced by ReactDOM.version?.split in #1269.

For now I've worked around it by transpiling react_ujs locally by adding additional_paths: [node_modules/react_ujs] to webpacker.yml.

Thanks for reporting the issue
We are working on a fix that should resolve this issue as well.

@jdelStrother
ReactRails 2.7.1 has been released. Please confirm the fix.

Thanks, looks good