Add more extensions to `next-types-plugin` for `Node16`/`NodeNext` (#52562)
### What? Why? How? Similar to https://github.com/vercel/next.js/pull/47571, add `.js` extensions to generated imports to avoid problems with TypeScript `Node16` / `NodeNext` module resolution Without this change, there are confusing errors with `{ experimental: { typedRoutes: true } }` in `next.config.js`, such as: ``` Property 'refresh' does not exist on type 'AppRouterInstance'.ts(2339) ``` <img width="490" alt="Screenshot 2023-07-11 at 19 12 21" src="https://github.com/vercel/next.js/assets/1935696/399265e6-223d-4386-bc85-6136d98e436a"> cc @shuding
Showing
Please
register
or
sign in
to comment