Skip to content

Commit b43779e

Browse files
authored
docs: Add migration docs to point out that default import does not work (#12100)
It was brought up #12013 that importing Sentry as a default import is not working anymore in v8. While this was never officially supported (and also not "removed" on purpose, it just seemed to have worked incidentally before), I do not really consider this a "breaking change", but, as pointed out in the issue, it is still helpful to point this out in the migration docs, for users who incidentally did this before. We should also add this to migration docs on docs.sentry.io.
1 parent dc9ed37 commit b43779e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

MIGRATION.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,14 @@ export class HeaderComponent {
13231323
}
13241324
```
13251325

1326+
## 6. Build Changes
1327+
1328+
We now provide a proper ESM output of the SDK. There have also been some other build changes under the hood. One side
1329+
effect of this is that importing Sentry as a default import does not work anymore. Note that this was never supported
1330+
(even on v7) and this was never intended to work (and also not documented anywhere). However, it seems that for some
1331+
configuration combinations, it was still possible to do `import Sentry from '@sentry/browser'`. This is not possible
1332+
anymore in v8. Please use `import * as Sentry from '@sentry/browser'` instead.
1333+
13261334
# Upgrading Sentry Feedback (beta, 7.x to 8.0)
13271335

13281336
For details on upgrading Feedback from the beta 7.x to the release 8.x version, please view the

0 commit comments

Comments
 (0)