Skip to content

Commit 490e49d

Browse files
dependabot[bot]tfwright
authored andcommitted
Bump esbuild from 0.14.10 to 0.25.0 in /assets
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.14.10 to 0.25.0. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2021.md) - [Commits](evanw/esbuild@v0.14.10...v0.25.0) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.25.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
1 parent 88fecce commit 490e49d

File tree

4 files changed

+3003
-1568
lines changed

4 files changed

+3003
-1568
lines changed

assets/esbuild.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ let opts = {
1818
target: 'es2016',
1919
outdir: '../dist/js',
2020
define: {
21-
'process.env.LATENCY_SIM': process.env.LATENCY_SIM || 0,
21+
'process.env.LATENCY_SIM': process.env.LATENCY_SIM || "0",
2222
},
2323
}
2424
if (mode === 'watch') {
2525
opts = {
26-
watch: true,
2726
sourcemap: 'inline',
2827
...opts
2928
}
@@ -35,13 +34,13 @@ if (mode === 'release') {
3534
}
3635
}
3736

38-
// Start esbuild with previously defined options
39-
// Stop the watcher when STDIN gets closed (no zombies please!)
40-
esbuild.build(opts).then((result) => {
37+
;(async () => {
38+
const context = await esbuild.context(opts)
39+
4140
if (mode === 'watch') {
42-
process.stdin.pipe(process.stdout)
43-
process.stdin.on('end', () => { result.stop() })
41+
context.watch()
42+
} else {
43+
await context.rebuild()
44+
context.dispose()
4445
}
45-
}).catch((error) => {
46-
process.exit(1)
47-
})
46+
})()

0 commit comments

Comments
 (0)