Fix the dangling promises

This commit is contained in:
Aria Minaei 2023-08-03 10:46:36 +02:00
parent 27f918f53c
commit 041627f7e4
19 changed files with 112 additions and 67 deletions

View file

@ -24,7 +24,7 @@ const definedGlobals = {
global: 'window',
}
function createBundles(watch: boolean) {
async function createBundles(watch: boolean) {
const pathToPackage = path.join(__dirname, '../')
const esbuildConfig: Parameters<typeof build>[0] = {
entryPoints: [path.join(pathToPackage, 'src/index.ts')],
@ -39,7 +39,7 @@ function createBundles(watch: boolean) {
plugins: [externalPlugin([/^[\@a-zA-Z]+/])],
}
build({
await build({
...esbuildConfig,
outfile: path.join(pathToPackage, 'dist/index.js'),
format: 'cjs',
@ -52,4 +52,4 @@ function createBundles(watch: boolean) {
// })
}
createBundles(false)
void createBundles(false)