auth0 / auth0-spa-js

Auth0 authentication for Single Page Applications (SPA) with PKCE
MIT License
903 stars 357 forks source link

auth0-spa-js.production.legacy.js default export is undefined #83

Closed Jorgevillada closed 5 years ago

Jorgevillada commented 5 years ago

hi, Currently I have some problems with the transpilation of auth0-spa-js.production.js

Failed to compile.
Failed to minify the code from this file: 
    ./node_modules/@auth0/auth0-spa-js/dist/auth0-spa-js.production.js:1:12440 
Read more here: http://bit.ly/2tRViJ9
error Command failed with exit code 1.

I tried to use the build auth0-spa-js.production.legacy.js, but it fails

import createAuth0Client from "@auth0/auth0-spa-js"; 

 const auth0FromHook = await createAuth0Client(initOptions);

webpack alias:

'@auth0/auth0-spa-js': node_modules/@auth0/auth0-spa-js/dist/auth0-spa-js.production.legacy.js

image

image

looking for the function getTokenSilently in auth0-spa-js.production.js exists, but in auth0-spa-js.production.legacy.js it does not exist

 "@auth0/auth0-spa-js": "^1.0.2",
luisrudge commented 5 years ago

@Jorgevillada are you using angular or typescript?

Jorgevillada commented 5 years ago

reactjs with webpack.

luisrudge commented 5 years ago

Duplicate of https://github.com/auth0/auth0-spa-js/issues/57. Looks like an internal config issue. You should probably exclude our library from being transpiled