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