Skip to content

Commit

Permalink
fix(esbuild): fix again 9f85a26
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Dec 30, 2024
1 parent d440a60 commit 4abab22
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/esbuild/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function getEsbuildPlugin<UserOptions = Record<string, never>>(
loader.options ||= _options
loader.onTransformCb = callback
},
} as EsbuildPluginBuild)
} as EsbuildPluginBuild, build)

// skip if no load & transform hooks
if (loader.onLoadCb || loader.onTransformCb)
Expand Down Expand Up @@ -141,9 +141,8 @@ export function getEsbuildPlugin<UserOptions = Record<string, never>>(
}

function buildSetup() {
return (plugin: UnpluginOptions): EsbuildPlugin['setup'] => {
return (rawBuild) => {
const build = rawBuild as EsbuildPluginBuild
return (plugin: UnpluginOptions) => {
return (build: EsbuildPluginBuild, rawBuild: PluginBuild) => {
const context = createBuildContext(build)
const { onStart, onEnd, onResolve, onLoad, onTransform, initialOptions } = build

Expand Down

0 comments on commit 4abab22

Please sign in to comment.