Skip to content

Commit

Permalink
feat: ✨ allow overriding esbuild.external #23
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 1, 2021
1 parent 5f005db commit 801eb20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import cache from "./cache"
export type TranspileOptions = {
type: "bundle" | "transform"
debug: boolean
esbuild?: CommonOptions | TransformOptions | BuildOptions
esbuild?: CommonOptions & TransformOptions & BuildOptions
}
const defaultOptions: TranspileOptions = { type: "bundle", debug: false }

Expand Down Expand Up @@ -91,7 +91,7 @@ function _bundle(
resolveDir: path.dirname(filename),
loader: loaders[ext],
},
external: externals,
external: [...externals, ...(options?.esbuild?.external ?? [])],
write: false,
},
})
Expand Down

0 comments on commit 801eb20

Please sign in to comment.