fix(nextjs): Fix requestAsyncStorageShim path resolution on windows#8875
Merged
fix(nextjs): Fix requestAsyncStorageShim path resolution on windows#8875
requestAsyncStorageShim path resolution on windows#8875Conversation
Contributor
size-limit report 📦
|
Lms24
reviewed
Aug 28, 2023
| const middlewareWrapperTemplatePath = path.resolve(__dirname, '..', 'templates', 'middlewareWrapperTemplate.js'); | ||
| const middlewareWrapperTemplateCode = fs.readFileSync(middlewareWrapperTemplatePath, { encoding: 'utf8' }); | ||
|
|
||
| const requestAsyncStorageShimPath = path.resolve(__dirname, '..', 'templates', 'requestAsyncStorageShim.js'); |
Member
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?
Contributor
Author
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.
Lms24
approved these changes
Aug 28, 2023
| "module": "build/esm/index.server.js", | ||
| "browser": "build/esm/index.client.js", | ||
| "types": "build/types/index.types.d.ts", | ||
| "exports": { |
Member
There was a problem hiding this comment.
Curious if this will cause any problems but given that tests pass, let's see 🤔
Contributor
Author
There was a problem hiding this comment.
we can never know... 😶🌫️
Contributor
There was a problem hiding this comment.
We can check with https://arethetypeswrong.github.io/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes build error reported in #8133 (comment)