From 7e69d7d9d0b05668c66c8cb5bb6ea673e79bc05e Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 12 Sep 2025 20:10:24 +0200 Subject: [PATCH] build: faster client build in watch mode (bypass babel and terser) --- scripts/client.rollup.config.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/client.rollup.config.js b/scripts/client.rollup.config.js index 5b099c0b..90300305 100644 --- a/scripts/client.rollup.config.js +++ b/scripts/client.rollup.config.js @@ -7,7 +7,8 @@ var commonjs = require('@rollup/plugin-commonjs'), license = require('rollup-plugin-license'), watchChange = require('./client.plugin-watch'), package = require('../package.json'), - path = require('path') + path = require('path'), + watch = process.argv.includes('--watch') module.exports = { input: 'src/client/index.mjs', @@ -32,7 +33,7 @@ module.exports = { browser: true }), commonjs(), - babel({ + watch ? {} : babel({ babelHelpers: 'bundled', babelrc: false, exclude: [ @@ -52,7 +53,7 @@ module.exports = { } ]] }), - terser({ + watch ? {} : terser({ safari10: true, sourceMap: true, keep_classnames: true, @@ -70,14 +71,14 @@ module.exports = { } } }, - license({ + watch ? {} :license({ banner: { content: { file: path.join(__dirname, 'license-header.txt'), }, } }), - copy({ + watch ? {} : copy({ targets: [ {src: 'resources/images/logo_nobadge.png', dest: 'app/assets/', rename: 'favicon.png'}, {src: 'resources/images/logo.png', dest: 'app/assets/'},