Skip to content

ReactDOM.version?.split not transpiled? #1277

@jdelStrother

Description

@jdelStrother

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions