Skip to content

Commit b9048ee

Browse files
authored
Fix files not being copied on first esbuild watch (microsoft#185618)
1 parent 5eeacc5 commit b9048ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

extensions/esbuild-webview-common.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ async function tryBuild(options, didBuild) {
6262
* @param {string[]} args
6363
* @param {(outDir: string) => unknown} [didBuild]
6464
*/
65-
module.exports.run = function (config, args, didBuild) {
65+
module.exports.run = async function (config, args, didBuild) {
6666
let outdir = config.outdir;
67-
6867
const outputRootIndex = args.indexOf('--outputRoot');
6968
if (outputRootIndex >= 0) {
7069
const outputRoot = args[outputRootIndex + 1];
@@ -81,7 +80,7 @@ module.exports.run = function (config, args, didBuild) {
8180

8281
const isWatch = args.indexOf('--watch') >= 0;
8382
if (isWatch) {
84-
tryBuild(resolvedOptions);
83+
await tryBuild(resolvedOptions, didBuild);
8584

8685
const watcher = require('@parcel/watcher');
8786
watcher.subscribe(config.srcDir, () => tryBuild(resolvedOptions, didBuild));

0 commit comments

Comments
 (0)