Skip to content

feat: Replace entries option with releaseInjectionTargets#123

Merged
lforst merged 7 commits into
mainfrom
lforst-yeet-is-entry-logic
Nov 17, 2022
Merged

feat: Replace entries option with releaseInjectionTargets#123
lforst merged 7 commits into
mainfrom
lforst-yeet-is-entry-logic

Conversation

@lforst
Copy link
Copy Markdown

@lforst lforst commented Nov 16, 2022

We faced problems when dogfooding the bundler plugin in https://github.com/getsentry/gib-potato.

  1. We tried to inject the release in non-JS files.

    • This PR addresses this by only injecting the release code when we encounter a file that ends in a JS-like file ending (.js, .ts, .jsx, .tsx, .cjs or .mjs).
  2. Considering the above fixed, if an app's entry point was a non-JS file (e.g. a .html file) we didn't inject the release anywhere at all.

    • We address this by injecting the release code in all user code modules (the bundlers will take care of only actually including the code once per bundle) and replacing the entries option with a new releaseInjectionTargets option to allow for more fine-grained control in overriding in which modules the release code should be injected. This is a breaking change so we added an entry in the migration docs.

@lforst lforst requested a review from Lms24 November 16, 2022 13:42
@lforst lforst self-assigned this Nov 16, 2022
Lms24
Lms24 previously approved these changes Nov 16, 2022
Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

🚢 it

Comment thread MIGRATION.md Outdated
@lforst lforst changed the title fix: Inject release in all JavaScript-like files feat: Replace entries option with releaseInjectionTargets Nov 16, 2022
@lforst lforst force-pushed the lforst-yeet-is-entry-logic branch from ee755ee to 1c727a5 Compare November 16, 2022 14:12
@lforst lforst requested a review from Lms24 November 16, 2022 14:44
@lforst lforst force-pushed the lforst-yeet-is-entry-logic branch from 57d0e1b to 02636cc Compare November 16, 2022 16:11
@lforst lforst changed the base branch from main to lforst-snapshot-e2e-tests November 16, 2022 16:12
Base automatically changed from lforst-snapshot-e2e-tests to main November 17, 2022 08:26
@lforst lforst enabled auto-merge (squash) November 17, 2022 09:33
@lforst lforst merged commit c576aff into main Nov 17, 2022
@lforst lforst deleted the lforst-yeet-is-entry-logic branch November 17, 2022 10:09
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.

2 participants