Skip to content

Commit

Permalink
fix(nextjs): Fix resolution of request storage shim fallback (#13929)
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored Oct 10, 2024
1 parent fcc3d2b commit 86c626e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
"node": "./build/cjs/index.server.js",
"import": "./build/esm/index.server.js"
},
"./async-storage-shim": {
"import": {
"default": "./build/esm/config/templates/requestAsyncStorageShim.js"
},
"require": {
"default": "./build/cjs/config/templates/requestAsyncStorageShim.js"
}
},
"./import": {
"import": {
"default": "./build/import-hook.mjs"
Expand Down
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/build/esm/config/templates/requestAsyncStorageShim.js',
'@sentry/nextjs/async-storage-shim',
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ export interface RequestAsyncStorage {
}
| undefined;
}

export const requestAsyncStorage = undefined;
export const workUnitAsyncStorage = undefined;

0 comments on commit 86c626e

Please sign in to comment.