From 35c78d2d5a0ee398bf4a6875539babc0e0fbe7b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Tue, 3 Dec 2024 16:40:41 +0800 Subject: [PATCH] fix(esbuild): compat esbuild before v0.14.3 closes #427 --- src/esbuild/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/esbuild/index.ts b/src/esbuild/index.ts index 46b98a21..6feb550b 100644 --- a/src/esbuild/index.ts +++ b/src/esbuild/index.ts @@ -213,7 +213,7 @@ function buildSetup() { if (plugin.load) { onLoad({ filter: onLoadFilter }, async (args) => { - const id = args.path + args.suffix + const id = args.path + (args.suffix || '') // compat for #427 const { errors, warnings, mixedContext } = createPluginContext(context) @@ -254,7 +254,7 @@ function buildSetup() { if (plugin.transform) { onTransform({ filter: onLoadFilter }, async (args) => { - const id = args.path + args.suffix + const id = args.path + (args.suffix || '') if (plugin.transformInclude && !plugin.transformInclude(id)) return