Skip to content

Conversation

@lforst
Copy link
Contributor

@lforst lforst commented Oct 1, 2022

Fixes #5863

The PR makes our auto wrapping of Next.js API routes able to handle CJS exports. Previously we only looked at import.default which is not defined in case the user exported via CJS export (e.g. module.exports = myFunction;)

@lforst lforst merged commit b7c0e54 into master Oct 3, 2022
@lforst lforst deleted the lforst-fix-nextjs-cjs-exported-api-routes-magic-wrapping branch October 3, 2022 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autoInstrumentServerFunctions breaks when the API route has a CJS export

3 participants