Skip to content

Commit 01db669

Browse files
committed
fix second bundles
1 parent 3903e1e commit 01db669

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tasks/util/bundle_wrapper.mjs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ export default async function _bundle(pathToIndex, pathToBundle, opts, cb) {
4242
config.minify = !!(pathToMinBundle && pending === 1);
4343
config.outfile = pathToBundle || pathToMinBundle;
4444
config.sourcemap = false;
45-
await build(config);
46-
47-
if(pending === 2) {
48-
config.minify = true;
49-
config.outfile = pathToMinBundle;
50-
// config.sourcemap = true;
51-
await build(config);
52-
}
53-
54-
if(cb) cb();
45+
build(config).then(function() {
46+
if(pending === 2) {
47+
config.minify = true;
48+
config.outfile = pathToMinBundle;
49+
// config.sourcemap = true;
50+
build(config).then(function() {
51+
if(cb) cb();
52+
});
53+
} else {
54+
if(cb) cb();
55+
}
56+
});
5557
}

0 commit comments

Comments
 (0)