You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://nextjs.org/docs/pages/api-reference/next-config-js mentions the next.config.mjs extension as well as using the TypeScript next.config.ts. I know this is likely PEBKAC, but with the Next.js 14 default being next.config.mjs, I assumed that I could be explicit and change this to next.config.mts.
However, running next build actually ignores this file without complaints and assumes the defaults as if this file doesn't exist. For example, setting this in next.config.mts
…supported yet) (#70376)
## Why?
We should update our documentation and also throw an error if somebody
tries to use the `.mts` ( ES Module TypeScript) extension with
`next.config`. We currently don't support this extension.
- Fixes: #70201
---------
Co-authored-by: JJ Kasper <jj@jjsweb.site>
What is the documentation issue?
https://nextjs.org/docs/pages/api-reference/next-config-js mentions the
next.config.mjs
extension as well as using the TypeScriptnext.config.ts
. I know this is likely PEBKAC, but with the Next.js 14 default beingnext.config.mjs
, I assumed that I could be explicit and change this tonext.config.mts
.However, running
next build
actually ignores this file without complaints and assumes the defaults as if this file doesn't exist. For example, setting this innext.config.mts
is ignored and the build is created in the
.next
directory.Is there any context that might help us understand?
I'm not sure of the proper solution, but one of
next.config.mts
isn't supported and will be ignorednext.config.mts
support is planned for, provide a note in the documentation.next.config.mts
support was expected to work, turn this documentation issue into a bug.next.config.mts
and provide a build log if found on how to resolveDoes the docs page already exist? Please link to it.
https://nextjs.org/docs/pages/api-reference/next-config-js
The text was updated successfully, but these errors were encountered: