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
I found the two sets of documentation above, and attempted to follow each of them in a net new next.js project with Typescript. Here are some issues I encountered:
next.config.js does not build when using import/export syntax
import.meta.url also requires module syntax
One set of docs calls out "validating environment variables at runtime and buildtime", but the default setup does not seem to create buildtime checking
If using jiti to add buildtime checking, next.config.js does not like module syntax, but client code does not like require / module.exports
The text was updated successfully, but these errors were encountered:
Module syntax is based on you having package.json#type set to module. If you don't have that then you need to use the .mjs extension. This is true for any javascript file so I don't see why we should make this clear in our docs.
I found the two sets of documentation above, and attempted to follow each of them in a net new
next.js
project with Typescript. Here are some issues I encountered:next.config.js
does not build when usingimport
/export
syntaximport.meta.url
also requires module syntaxjiti
to add buildtime checking, next.config.js does not like module syntax, but client code does not like require / module.exportsThe text was updated successfully, but these errors were encountered: