From 04059920bbc3472c53321c12164263d66e6d7aaf Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Thu, 21 May 2026 22:10:56 -0700 Subject: [PATCH] chore: Don't use rollup serving by default (#2495) --- rollup.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 34c881e1..abef3185 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -14,6 +14,10 @@ import { visualizer } from 'rollup-plugin-visualizer'; const watch = process.env.ROLLUP_WATCH === 'true' || process.env.ROLLUP_WATCH === '1'; const dev = watch || process.env.DEV === 'true' || process.env.DEV === '1'; +// Opt-in dev server: `rollup -c --watch --environment SERVE`. Off by default +// for deployments that read output from the filesystem. +const serveEnabled = process.env.SERVE === 'true' || process.env.SERVE === '1'; + /** * @type {import('rollup-plugin-serve').ServeOptions} */ @@ -64,7 +68,7 @@ const plugins = [ process.env.RELEASE_VERSION ?? (dev ? 'dev' : 'pkg'), }, }), - watch && serve(serveopts), + serveEnabled && serve(serveopts), !dev && terser(), visualizer({ filename: 'visualizations/treemap.html',