Skip to content

Commit 846e9ed

Browse files
authored
fix(core): Don't exclude release injection module (#200)
1 parent 421ee29 commit 846e9ed

File tree

1 file changed

+4
-4
lines changed
  • packages/bundler-plugin-core/src

1 file changed

+4
-4
lines changed

packages/bundler-plugin-core/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ const unplugin = createUnplugin<Options>((options, unpluginMetaContext) => {
193193
transformInclude(id) {
194194
logger.debug('Called "transformInclude":', { id });
195195

196+
if (id.includes("sentry-release-injection-file")) {
197+
return true;
198+
}
199+
196200
if (id.match(/\\node_modules\\|\/node_modules\//)) {
197201
return false; // never transform 3rd party modules
198202
}
@@ -201,10 +205,6 @@ const unplugin = createUnplugin<Options>((options, unpluginMetaContext) => {
201205
// a windows style path to `releaseInjectionTargets`
202206
const normalizedId = path.normalize(id);
203207

204-
if (id.includes("sentry-release-injection-file")) {
205-
return true;
206-
}
207-
208208
if (internalOptions.releaseInjectionTargets) {
209209
// If there's an `releaseInjectionTargets` option transform (ie. inject the release varible) when the file path matches the option.
210210
if (typeof internalOptions.releaseInjectionTargets === "function") {

0 commit comments

Comments
 (0)