import esbuild from 'esbuild'; const watch = process.argv.includes('--watch'); const opts = { entryPoints: ['src/extension.ts'], bundle: true, outfile: 'dist/extension.js', format: 'esm', target: 'firefox128', platform: 'neutral', external: [ 'gi://*', 'resource:///*', 'system', 'cairo', 'gettext', ], sourcemap: 'inline', logLevel: 'info', }; if (watch) { const ctx = await esbuild.context(opts); await ctx.watch(); } else { await esbuild.build(opts); }