Firebase-js-sdk: Auth: ES modules build

Created on 14 May 2018  路  9Comments  路  Source: firebase/firebase-js-sdk

Environment

  • Operating System version: any
  • Firebase SDK version: 5.0.2
  • Firebase Product: auth

The problem

auth package does not include an ES modules build

Steps to reproduce:

Install @firebase/app and use it in a project aimed for module-aware browsers, e.g. Polymer 3 application. Observe an error in the console:

Uncaught ReferenceError: require is not defined
    at auth.js:2
    [...]

The issue is caused by a lack of ES module build of the library (no valid output file and no module field in a package.json.

Relevant Code:

import firebase from '@firebase/app';
import '@firebase/auth';
auth

Most helpful comment

@okydk still not working for me even with 5.0.4

All 9 comments

Have exactly the same issue. Any updates on a solution?

I made a PR to add one, but there is something funky going on with Travis. There is some process which does not exit, but I have trouble identifying which one is it. I probably won't have time to dig deeper for a next few days.

Hi Merlinnot, sorry to bug you but any progress here?

Had a similar issue, but all is working in latest build ([email protected]).

import firebase from 'firebase/app'
import 'firebase/auth'
import 'firebase/firestore'
import 'firebase/storage'

Hi, thanks for the ping, kinda forgot about it. I'll give it another shot right now.

Status update: found a 馃悰, now 馃洜.

Fixed, now waiting for a review.

@okydk still not working for me even with 5.0.4

the other work-around is in #815

Was this page helpful?
0 / 5 - 0 ratings