Uh oh!
There was an error while loading. Please reload this page.
fix(nextjs): Fix requestAsyncStorageShim path resolution on windows - #8875
Conversation
size-limit report 📦
|
| const middlewareWrapperTemplatePath = path.resolve(__dirname, '..', 'templates', 'middlewareWrapperTemplate.js'); | ||
| const middlewareWrapperTemplateCode = fs.readFileSync(middlewareWrapperTemplatePath, { encoding: 'utf8' }); | ||
| const requestAsyncStorageShimPath = path.resolve(__dirname, '..', 'templates', 'requestAsyncStorageShim.js'); |
There was a problem hiding this comment.
seeing that we have a few of these below, should we all replace them with an @sentry/nextjs/* path?
There was a problem hiding this comment.
So this particular thing we're changing in this PR is actually something we let webpack import for us. All of the other paths in this file are actual templates we just call fs.readFile on, so no need to have some sort of special resolution as of now.
| "module": "build/esm/index.server.js", | ||
| "browser": "build/esm/index.client.js", | ||
| "types": "build/types/index.types.d.ts", | ||
| "exports": { |
There was a problem hiding this comment.
Curious if this will cause any problems but given that tests pass, let's see 🤔
There was a problem hiding this comment.
we can never know... 😶🌫️
There was a problem hiding this comment.
We can check with https://arethetypeswrong.github.io/
Fixes build error reported in #8133 (comment)