summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Bjorn Lu <bjornlu.dev@gmail.com> 2023-06-27 11:59:22 +0800
committerGravatar GitHub <noreply@github.com> 2023-06-27 11:59:22 +0800
commit57e603038fa51f5cf023c086705e2ced67434b38 (patch)
treeb2a95f9ffe9927b9799fc587ef3b869389466f7e
parent2eca765f91fb9cb0f6b77bbadb9118a0b976cdf7 (diff)
downloadastro-57e603038fa51f5cf023c086705e2ced67434b38.tar.gz
astro-57e603038fa51f5cf023c086705e2ced67434b38.tar.zst
astro-57e603038fa51f5cf023c086705e2ced67434b38.zip
Handle esbuild 0.18 changes (#7479)
Diffstat (limited to '')
-rw-r--r--.changeset/happy-stingrays-carry.md5
-rw-r--r--packages/astro/src/vite-plugin-astro/compile.ts2
-rw-r--r--packages/astro/src/vite-plugin-jsx/index.ts2
3 files changed, 9 insertions, 0 deletions
diff --git a/.changeset/happy-stingrays-carry.md b/.changeset/happy-stingrays-carry.md
new file mode 100644
index 000000000..f63778dcf
--- /dev/null
+++ b/.changeset/happy-stingrays-carry.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Handle esbuild 0.18 changes
diff --git a/packages/astro/src/vite-plugin-astro/compile.ts b/packages/astro/src/vite-plugin-astro/compile.ts
index 799e09e8e..6bee4f672 100644
--- a/packages/astro/src/vite-plugin-astro/compile.ts
+++ b/packages/astro/src/vite-plugin-astro/compile.ts
@@ -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',
},
},
diff --git a/packages/astro/src/vite-plugin-jsx/index.ts b/packages/astro/src/vite-plugin-jsx/index.ts
index 91aa63909..9364a4e0b 100644
--- a/packages/astro/src/vite-plugin-jsx/index.ts
+++ b/packages/astro/src/vite-plugin-jsx/index.ts
@@ -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',
},
},