From ed3910df6394b31b2c4d6529aeb5f0e530b05afe Mon Sep 17 00:00:00 2001 From: hyrious Date: Fri, 7 Jun 2024 15:02:41 +0800 Subject: [PATCH] fix esbuild >= 0.21.0 panic without `object-accessors` --- src/components/Features.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Features.svelte b/src/components/Features.svelte index badc965..57a2039 100644 --- a/src/components/Features.svelte +++ b/src/components/Features.svelte @@ -132,6 +132,10 @@ if (this.cancelled) return for (const feat of features) { + // Bypass a bug where esbuild >= 0.21.0 will panic without the 'object-accessors' feature. + if (feat === 'object-accessors' && esbuild.version >= '0.21.0') { + continue + } options.supported = { [feat]: false } try { await esbuild.transform(code, options).then((r) => {