Am I mistaken or is there a preview mode similar to `vite preview`?
Answered
Griffon Nivernais posted this in #help-forum
Griffon NivernaisOP
At the moment I achieve this via
"preview": "next build --no-lint && NODE_OPTIONS=\"--max-old-space-size=8192\" next start",. Naturally this is absurdly slow, and was wondering if this is already a thing?Answered by joulev
No there isn’t. The closest one you have is next build then next start which is what all of us have been using to test the app in production mode
10 Replies
preview as in
next dev ?Griffon NivernaisOP
Preview as in
The premise is that you can view your application in a local, production environment similar to how
vite preview if you know of Vite.The premise is that you can view your application in a local, production environment similar to how
vite dev/next dev does for the development environment.Griffon NivernaisOP
Bump
Griffon NivernaisOP
Bump.
No there isn’t. The closest one you have is next build then next start which is what all of us have been using to test the app in production mode
Answer
Bombay
next build && next start should do thatyou can add script in
package.json like "preview": "next build && next start"Yes that’s exactly what they have been doing, see above
Griffon NivernaisOP
No worries, maybe one day there will be a faster alternative. â¤ï¸
Thanks for the input!