Skip to content

feat(core): Import release injection code from each module#188

Merged
lforst merged 12 commits into
mainfrom
lforst-better-release-injection
Mar 30, 2023
Merged

feat(core): Import release injection code from each module#188
lforst merged 12 commits into
mainfrom
lforst-better-release-injection

Conversation

@lforst
Copy link
Copy Markdown

@lforst lforst commented Mar 28, 2023

Fixes #182
Fixes #180

This somewhat reverts to an old behavior where we inject the release injector code into each module. The difference this time is that we reference a file that actually exists in our package instead of a virtual file. This should circumvent the situation we ran into in #163 because the release injector module will now always exist.

@lforst lforst requested review from Lms24 and mydea March 29, 2023 09:50
@lforst lforst marked this pull request as ready for review March 29, 2023 09:50
Comment on lines -15 to -20
"exports": {
".": {
"import": "./dist/esm/index.mjs",
"require": "./dist/cjs/index.js"
}
},
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing weird problems when importing @sentry/bundler-plugin-core/sentry-release-injection-file. This standard is cursed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be that with this you have to name it sentry-release-injection-file.mjs for esm.

@lforst lforst requested a review from AbhiPrasad March 29, 2023 14:16
Comment on lines -15 to -20
"exports": {
".": {
"import": "./dist/esm/index.mjs",
"require": "./dist/cjs/index.js"
}
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be that with this you have to name it sentry-release-injection-file.mjs for esm.

@lforst lforst merged commit 0607188 into main Mar 30, 2023
@lforst lforst deleted the lforst-better-release-injection branch March 30, 2023 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic Release Numbering / Error correlation doesn't appear to work Release injection not working with @sentry/plugin-vite

2 participants