Skip to content

Commit 1b523d4

Browse files
agviegasclaude
andcommitted
fix(serve): silence empty-import-meta esbuild warning
IIFE format leaves import.meta empty, which esbuild warns about for every consumer of `thatopen serve`. The only triggering code path in our ecosystem (the @thatopen/fragments worker URL fallback) is unreachable in practice — all callers go through FragmentsManager.getWorker(). Silencing the warning removes noise on every build without hiding any real bug. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 260f351 commit 1b523d4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/cli/commands/serve.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ export const serveCommand = new Command('serve')
5555
outfile: bundlePath,
5656
sourcemap: true,
5757
logLevel: 'info',
58+
logOverride: {
59+
// IIFE format leaves import.meta empty. The only consumer of import.meta
60+
// in our ecosystem today is @thatopen/fragments' worker URL fallback,
61+
// which is never executed because ViewportsManager (and any other
62+
// FragmentsManager.init caller) always passes an explicit worker URL via
63+
// FragmentsManager.getWorker(). Silencing avoids noise on every build.
64+
'empty-import-meta': 'silent',
65+
},
5866
plugins: [
5967
{
6068
name: 'reload',

0 commit comments

Comments
 (0)