Skip to content

Unexpected keyword const - breaks applications in older browsers that don't support the const ES6 keyword #715

@jhades

Description

@jhades

In older browsers that only support plain ES5, like older Safari versions but still very popular in a lot of iPhone and iPad devices, we get the following error:

"Unexpected keyword 'const'. Const declarations are not supported in strict mode."

This has been tracked down to the presence of the ES6 const keyword, at the very end of the esm.js bundle on the dist folder of the firebaseui dependency:

At the end of the esm.js file we currently find:

const auth = firebaseui.auth;export { auth } ;

If we switch the const to var it fixes the issue.

  • Operating System version: IOs 8.4
  • Browser version: Safari 8
  • Firebase UI version: 4.5.0
  • Firebase SDK version: 6.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions