baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

SyntaxError: Unexpected token 'export' #150

Closed baptisteArno closed 3 years ago

baptisteArno commented 3 years ago

When building with Next.js I get this error:

> Build error occurred
/Users/baptistearnaud/Dev/turn-up/turn-up/node_modules/capacitor-firebase-auth/dist/esm/index.js:1
export * from './definitions';
^^^^^^

SyntaxError: Unexpected token 'export'
baptisteArno commented 3 years ago

A work around is to dynamically import the plugin:

const { cfaSignIn } = await import("capacitor-firebase-auth");
cfaSignIn("google.com").subscribe();
baumblatt commented 3 years ago

Hi @baptisteArno ,

Sorry, I don't have any knowledge of Next.js. Do you have any clue of what can be done to solve this?

baptisteArno commented 3 years ago

It seems you don't have to do anything.