From 4d9f25228920ed977746e3d1bbd0fbd4bab18ba8 Mon Sep 17 00:00:00 2001 From: Zyie <24736175+Zyie@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:42:06 +0000 Subject: [PATCH] Fix: rollup fails to build if you provide no environments --- lib/configs/rollup.mjs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/configs/rollup.mjs b/lib/configs/rollup.mjs index e051100..a7c591e 100644 --- a/lib/configs/rollup.mjs +++ b/lib/configs/rollup.mjs @@ -126,6 +126,20 @@ if (namespace === 'PIXI') } export default [ + // Module browser bundle (esm) + { + external, + plugins: browserPlugins, + input: extensionConfig.bundleModuleSource ?? source, + treeshake: false, + output: { + banner, + file: bundleModule, + format: 'esm', + sourcemap: true, + exports: extensionConfig.bundleModuleExports, + }, + }, ...!extensionConfig.environments.includes('node') ? [] : [{ external, input: source, @@ -167,19 +181,5 @@ export default [ globals, exports: extensionConfig.bundleExports, }, - }, - // Module browser bundle (esm) - { - external, - plugins: browserPlugins, - input: extensionConfig.bundleModuleSource ?? source, - treeshake: false, - output: { - banner, - file: bundleModule, - format: 'esm', - sourcemap: true, - exports: extensionConfig.bundleModuleExports, - }, }], ];