From 6cf3e64003fa75f52d438c86f56c326a2308c1dc Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Fri, 26 Jan 2024 13:29:55 +0100 Subject: [PATCH] Add esbuild options for handling PNG files --- tsup.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tsup.config.ts b/tsup.config.ts index d159f256e18f..9672ebadb376 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -81,6 +81,13 @@ export default defineConfig(async (options) => { target: BROWSER_TARGET, platform: "browser", external: globalManagerPackages, + esbuildOptions(options) { + options.conditions = ["module"]; + options.loader = { + ...options.loader, + ".png": "dataurl", + }; + }, }); }