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.
Checklist
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:
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