Skip to content

Commit

Permalink
fix(nextjs): Adjust path to requestAsynStorageShim.js template file (
Browse files Browse the repository at this point in the history
…#13928)

Looks like we missed adding the `build` dir to the template path of
`requestAsyncStorageShim` in the NextJS SDK when we changed the
package-internal directory structure a while ago (IIRC this was pre-v8
but not sure actually)

I'm a bit surprised that this works at all, given we use `exports`
conditions and this is a path to a specific file not covered by any
`exports` entry. But I guess webpack can handle this still.

EDIT: Well turns out, this doesn't work. We'll need to add the `exports`
entries.

fixes #13925

closes #13926
closes #13927
  • Loading branch information
Lms24 authored Oct 10, 2024
1 parent d7c33a2 commit 0be3137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nextjs/src/config/loaders/wrappingLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default function wrappingLoader(
}
templateCode = templateCode.replace(
/__SENTRY_NEXTJS_REQUEST_ASYNC_STORAGE_SHIM__/g,
'@sentry/nextjs/esm/config/templates/requestAsyncStorageShim.js',
'@sentry/nextjs/build/esm/config/templates/requestAsyncStorageShim.js',
);
}

Expand Down

0 comments on commit 0be3137

Please sign in to comment.