diff --git a/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts b/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts index 2675a33afd341..1e468649f67bf 100644 --- a/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts +++ b/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts @@ -404,15 +404,15 @@ declare namespace __next_route_internal_types__ { } declare module 'next' { - export { default } from 'next/types' - export * from 'next/types' + export { default } from 'next/types/index.js' + export * from 'next/types/index.js' export type Route = __next_route_internal_types__.RouteImpl } declare module 'next/link' { - import type { LinkProps as OriginalLinkProps } from 'next/dist/client/link' + import type { LinkProps as OriginalLinkProps } from 'next/dist/client/link.js' import type { AnchorHTMLAttributes, DetailedHTMLProps } from 'react' import type { UrlObject } from 'url' @@ -440,9 +440,9 @@ declare module 'next/link' { } declare module 'next/navigation' { - export * from 'next/dist/client/components/navigation' + export * from 'next/dist/client/components/navigation.js' - import type { NavigateOptions, AppRouterInstance as OriginalAppRouterInstance } from 'next/dist/shared/lib/app-router-context' + import type { NavigateOptions, AppRouterInstance as OriginalAppRouterInstance } from 'next/dist/shared/lib/app-router-context.js' interface AppRouterInstance extends OriginalAppRouterInstance { /** * Navigate to the provided href.