-
|
Hi there, I'm using the npm package @auth0/auth0-spa-js in my project. There's no problem if I copy the file in my src directory and import it explicitely, so it may be some kind of edge case when parsing minified module source. Bonus question and not, say, , which also exists ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
|
We just resolve as the package.json tells us :) For this package, it points to the "production" build: https://unpkg.com/@auth0/auth0-spa-js@1.12.1/package.json if you want to use "development", you'll need to define your own "alias" in your Snowpack config: https://www.snowpack.dev/#alias-options I'm not sure what could be causing this, but I bet you're right that the minified code isn't parsed correctly. Can you try again with the dev entrypoint and report back if that works? |
Beta Was this translation helpful? Give feedback.
-
|
Ah yes, the So the unminified development version is parsed and installed with no problem. side-note: I tested by directly modifying the installed module's package.json, since the alias causes the web module installation to fail silently. Am I doing something wrong ? By the way, great project. This is obviously the way to go. |
Beta Was this translation helpful? Give feedback.
-
|
I'm getting the same error with 2.12.0 and typescript, but for auth0-react.
|
Beta Was this translation helpful? Give feedback.
I'm getting the same error with 2.12.0 and typescript, but for auth0-react.
It has auth0-spa-js as its dependency, not sure if its the cause. I tried adding the alias but it's not working, any ideas on how I can fix this?
[snowpack] Failed to load node_modules/@auth0/auth0-react/dist/auth0-react.esm.js Unterminated string constant [snowpack] Install failed.