Skip to content

Commit

Permalink
Handle esbuild 0.18 changes (#7479)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Jun 27, 2023
1 parent 2eca765 commit 57e6030
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-stingrays-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Handle esbuild 0.18 changes
2 changes: 2 additions & 0 deletions packages/astro/src/vite-plugin-astro/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export async function cachedFullCompilation({
tsconfigRaw: {
compilerOptions: {
// Ensure client:only imports are treeshaken
// @ts-expect-error anticipate esbuild 0.18 feature
verbatimModuleSyntax: false,
importsNotUsedAsValues: 'remove',
},
},
Expand Down
2 changes: 2 additions & 0 deletions packages/astro/src/vite-plugin-jsx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ export default function jsx({ settings, logging }: AstroPluginJSXOptions): Plugi
tsconfigRaw: {
compilerOptions: {
// Ensure client:only imports are treeshaken
// @ts-expect-error anticipate esbuild 0.18 feature
verbatimModuleSyntax: false,
importsNotUsedAsValues: 'remove',
},
},
Expand Down

0 comments on commit 57e6030

Please sign in to comment.