Skip to content

Commit

Permalink
Merge branch 'canary' into patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Aug 7, 2022
2 parents c2a27a0 + dc13c12 commit 3512ebf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/next/server.js
Expand Up @@ -14,4 +14,13 @@ if (typeof URLPattern !== 'undefined') {
serverExports.URLPattern = URLPattern
}

// https://nodejs.org/api/esm.html#commonjs-namespaces
// When importing CommonJS modules, the module.exports object is provided as the default export
module.exports = serverExports

// make import { xxx } from 'next/server' work
exports.NextRequest = serverExports.NextRequest
exports.NextResponse = serverExports.NextResponse
exports.userAgentFromString = serverExports.userAgentFromString
exports.userAgent = serverExports.userAgent
exports.URLPattern = serverExports.URLPattern

0 comments on commit 3512ebf

Please sign in to comment.