Search
Get Started
TTC
Theo's Typesafe Cult
•
4y ago
shikishikichangchang
Why does npm run build use only server-side render?
no static generation
?
Theo's Typesafe Cult
Join
26,249
Members
View on Discord
Was this page helpful?
Yes
No
S
shikishikichangchang
no static generation?
B
barry
•
12/7/22, 6:58 PM
what react version lol
S
shikishikichangchang
OP
•
12/7/22, 7:35 PM
Found the culprit
S
shikishikichangchang
OP
•
12/7/22, 7:35 PM
next
-translate
S
shikishikichangchang
OP
•
12/7/22, 7:36 PM
It uses getInitialProps internally
S
shikishikichangchang
OP
•
12/7/22, 7:36 PM
so when I did
.
.
.nextTranslate
(
) in next
.config
.js
, it adds getInitialProps to every page
S
shikishikichangchang
OP
•
12/7/22, 7:36 PM
And therefore all the pages are ssr
.
.
.smh