Skip to content

Commit

Permalink
feat: update esbuild to 0.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jun 15, 2023
1 parent 8fe6952 commit 584c9ee
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 73 deletions.
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"esbuild": "^0.17.5",
"esbuild": "^0.18.2",
"postcss": "^8.4.24",
"rollup": "^3.21.0"
},
Expand Down
7 changes: 5 additions & 2 deletions packages/vite/src/node/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,22 @@ export async function transformWithEsbuild(
}
}

const resolvedOptions = {
const resolvedOptions: TransformOptions = {
sourcemap: true,
// ensure source file name contains full query
sourcefile: filename,
...options,
loader,
tsconfigRaw,
} as ESBuildOptions
}

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

try {
Expand Down
140 changes: 70 additions & 70 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 584c9ee

Please sign in to comment.