Commit c0998841 by PLN (Algolia)

build: isolated dev store (.next-dev) — a prod build can no longer kill a live dev server

parent 5d9ce1dc
......@@ -11,8 +11,9 @@ node_modules/
/coverage
/test-results/
# next.js
# next.js (dev and prod build stores — isolated, see next.config.js)
/.next/
/.next-dev/
/out/
# production
......
......@@ -6,6 +6,10 @@ module.exports = {
// nginx. Every route is prerendered at build; ISR is replaced by
// rebuild-on-push.
output: 'export',
// Isolated build stores: dev writes `.next-dev`, prod writes `.next`. A
// `yarn build` under a live dev server used to overwrite `.next` under it —
// chunk paths went stale and the dev runtime died mid-request. Never again.
distDir: process.env.NODE_ENV === 'development' ? '.next-dev' : '.next',
images: {
// `next/image` optimization needs a server; flat files ship originals.
unoptimized: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment