0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Handle esbuild 0.18 changes (#7479)

This commit is contained in:
Bjorn Lu 2023-06-27 11:59:22 +08:00 committed by GitHub
parent 2eca765f91
commit 57e603038f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Handle esbuild 0.18 changes

View file

@ -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',
},
},

View file

@ -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',
},
},