summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmd/build.js6
-rwxr-xr-xscripts/index.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/scripts/cmd/build.js b/scripts/cmd/build.js
index 27941b514..92cb724bf 100644
--- a/scripts/cmd/build.js
+++ b/scripts/cmd/build.js
@@ -10,7 +10,9 @@ const defaultConfig = {
minify: false,
format: 'esm',
platform: 'node',
- target: 'node14.16.1',
+ // There's an issue with 'node12.20' compiling ESM to CJS
+ // so use 'node13.2' instead. V8 support should be similar.
+ target: 'node13.2',
sourcemap: 'inline',
sourcesContent: false,
};
@@ -63,7 +65,7 @@ export default async function build(...args) {
});
process.on('beforeExit', () => {
- builder.stop?.();
+ builder.stop && builder.stop();
});
}
diff --git a/scripts/index.js b/scripts/index.js
index 9025e4781..7908b112c 100755
--- a/scripts/index.js
+++ b/scripts/index.js
@@ -5,12 +5,12 @@ export default async function run() {
case 'dev':
case 'build': {
const { default: build } = await import('./cmd/build.js');
- build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
+ await build(...args, cmd === 'dev' ? 'IS_DEV' : undefined);
break;
}
case 'copy': {
const { default: copy } = await import('./cmd/copy.js');
- copy(...args);
+ await copy(...args);
break;
}
}