Replies: 2 comments
-
This is absolutely a very common issue in the field. I too think this should be built in. It definitely falls in line with the emphasis on helping people have small bundles. It’s way too easy to import a huge server library into frontend code. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would love an update on this feature! Very important imo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recently, I imported
next-auth
into a client code and it started to throwing a lot of weird issues. Simple googling didn't help.Then it seems like this I had to import
next-auth/client
.It's not just me, some others face this issue too.
So, it'll be nice if Next.js can render a warning if we try to import such a module. This will be a really nice touch to reduce human errors like this.
I'm not exactly sure on how to detect these modules, but something that depends on core NPM modules like
fs
&http
is a good start.Beta Was this translation helpful? Give feedback.
All reactions