Skip to content

Commit

Permalink
fix(esbuild): compat esbuild before v0.14.3
Browse files Browse the repository at this point in the history
closes #427
  • Loading branch information
sxzz committed Dec 3, 2024
1 parent 1b697de commit 35c78d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/esbuild/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 35c78d2

Please sign in to comment.