Skip to content

Commit

Permalink
fix: esbuild complains with extra fields (#12516)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Mar 21, 2023
1 parent a2af2f0 commit 7be0ba5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vite/src/node/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ export async function transformWithEsbuild(
tsconfigRaw,
} as ESBuildOptions

// Some projects in the ecosystem are calling this function with an ESBuildOptions
// object and esbuild throws an error for extra fields
delete resolvedOptions.include
delete resolvedOptions.exclude
delete resolvedOptions.jsxInject

try {
const result = await transform(code, resolvedOptions)
let map: SourceMap
Expand Down

0 comments on commit 7be0ba5

Please sign in to comment.