From 4732c55242f82e22e8757d6a7b7575ccd37b8ff2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 15 Oct 2020 09:04:57 +0100 Subject: [PATCH] Don't run terser in standard components in dev mode --- packages/standard-components/rollup.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/standard-components/rollup.config.js b/packages/standard-components/rollup.config.js index 2b5aa7ce3d..202adde702 100644 --- a/packages/standard-components/rollup.config.js +++ b/packages/standard-components/rollup.config.js @@ -4,6 +4,7 @@ import commonjs from "@rollup/plugin-commonjs" import postcss from "rollup-plugin-postcss" import { terser } from "rollup-plugin-terser" +const production = !process.env.ROLLUP_WATCH const lodash_fp_exports = ["isEmpty"] export default { @@ -17,7 +18,8 @@ export default { }, ], plugins: [ - terser(), + // Only run terser in production environments + production && terser(), postcss({ plugins: [], }),