Skip to content

Commit

Permalink
fix type import
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed May 4, 2023
1 parent f480125 commit 482cfab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/next/src/build/webpack/plugins/next-types-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ function createTypeGuardFile(
slots?: string[]
}
) {
// Use `import = require()` to avoid TypeScript's "esModuleInterop" flag causing
// problems.
return `// File: ${fullPath}
import entry = require('${relativePath}.js')
import entry from '${relativePath}.js'
${
options.type === 'route'
? `import type { NextRequest } from 'next/server.js'`
Expand Down

0 comments on commit 482cfab

Please sign in to comment.