Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename generated dist/auth0-vue.production.esm.js to dist/auth0-vue.production.esm.mjs #429

Open
6 tasks done
joostvdwsd opened this issue Oct 28, 2024 · 0 comments
Open
6 tasks done
Labels
bug This points to a verified bug in the code

Comments

@joostvdwsd
Copy link

Checklist

  • The issue can be reproduced in the auth0-vue sample app (or N/A).
  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

I'm trying to use Astro + Vue in a yarn berry environment.

The auth0-vue package is working perfect in runtime vue but not during the build phase.

While building I get the error "Cannot use import statement outside a module". This is fixed by either:

  • adding type: module to the package.json of @auth0/auth0-vue
  • renaming the esm distibutable js so it has the mjs extension (dist/auth0-vue.production.esm.js => dist/auth0-vue.production.esm.mjs)

The build breaks on the import statement itself so wrapping this in the normal "onMounted" will not work.

Basically the generated package is incorrect. Therefor I see this as a bug.

Reproduction

At this moment I do not have a straight forward reproducible example. If this is still needed for this ticket and if I decide to continue with auth0 I might consider making one.

Additional context

No response

auth0-vue version

2.3.3

Vue version

3.5.12

Which browsers have you tested in?

Chrome, Safari, Firefox

@joostvdwsd joostvdwsd added the bug This points to a verified bug in the code label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

1 participant