Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Self-hosted/on-premise
Which package are you using?
@sentry/vue
SDK Version
7.16
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
Simply use a dynamic import
import(/* webpackChunkName: "sentry" */'@sentry/vue').then(({init}) => {
init({
Vue,
environment: process.env.SERVE ? 'local' : process.env.NODE_ENV,
dsn: process.env.VUE_APP_SENTRY_DSN,
})
});
Or
import(/* webpackChunkName: "sentry" */'@sentry/vue').then(({ setUser }) => {
setUser({ id, email, username: (first_name + ' ' + last_name).trim() });
});
Expected Result
Sentry to initialize correctly
Actual Result
TypeError: init is not a function
This happened between 7.15 (last known working version) and 7.16
The @sentry/core
dynamic import still seems to work, but the init
one is specific to @sentry/vue
and cannot be used with a dynamic import anymore
Metadata
Metadata
Assignees
Labels
No labels