fix: use esnext target, drop vite-plugin-top-level-await
CI / Build & Quality Checks (push) Failing after 5m27s

Plugin crashes with Rollup 4. esnext target supports TLA natively.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lotus Bot
2026-05-21 21:07:12 -04:00
parent fa50a45e84
commit 74f2a49543
+1 -10
View File
@@ -6,7 +6,6 @@ import { viteStaticCopy } from 'vite-plugin-static-copy';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
import inject from '@rollup/plugin-inject';
import topLevelAwait from 'vite-plugin-top-level-await';
import { VitePWA } from 'vite-plugin-pwa';
import fs from 'fs';
import path from 'path';
@@ -79,23 +78,15 @@ export default defineConfig({
port: 8080,
host: true,
fs: {
// Allow serving files from one level up to the project root
allow: ['..'],
},
},
plugins: [
serverMatrixSdkCryptoWasm('/node_modules/.vite/deps/pkg/matrix_sdk_crypto_wasm_bg.wasm'),
topLevelAwait({
// The export name of top-level await promise for each chunk module
promiseExportName: '__tla',
// The function to generate import names of top-level await promise in each chunk module
promiseImportName: (i) => `__tla_${i}`,
}),
viteStaticCopy(copyFiles),
vanillaExtractPlugin(),
wasm(),
react(),
// Upload source maps to Sentry when auth token is present, then delete maps from dist
...(process.env.SENTRY_AUTH_TOKEN
? [
sentryVitePlugin({
@@ -131,7 +122,6 @@ export default defineConfig({
global: 'globalThis',
},
plugins: [
// Enable esbuild polyfill plugins
NodeGlobalsPolyfillPlugin({
process: false,
buffer: true,
@@ -140,6 +130,7 @@ export default defineConfig({
},
},
build: {
target: 'esnext',
outDir: 'dist',
sourcemap: process.env.SENTRY_AUTH_TOKEN ? 'hidden' : false,
copyPublicDir: false,