Skip to content

Imports in next.config.ts is allowed in Next 15+ #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JulianKingman opened this issue May 7, 2025 · 2 comments
Open

Imports in next.config.ts is allowed in Next 15+ #343

JulianKingman opened this issue May 7, 2025 · 2 comments

Comments

@JulianKingman
Copy link
Contributor

As I was setting up t3-env in my latest project, I noticed that Next 15 now supports imports in next.config.ts, no jiti required.

source:
vercel/next.js#35969 (comment)

PR for docs update:
#342

@JulianKingman JulianKingman changed the title next.config.ts is allowed in Next 15+ Imports in next.config.ts is allowed in Next 15+ May 7, 2025
@FleetAdmiralJakob
Copy link

Screenshot_20250531-172650~2.png

@juliansommer
Copy link

Screenshot_20250531-172650~2.png

they updated it recently so you can import esm modules in next.config.ts. just must not have updated the docs but it definitely does work.

in my next.config.ts I just do this

import "./src/env"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants