From ddcc941b127c5e5c14622472832e124c2c0b7935 Mon Sep 17 00:00:00 2001 From: Daniel da Silva Date: Tue, 5 Jul 2022 18:49:16 +0100 Subject: [PATCH] Update build task to account for public url --- gulpfile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 0bd9bf8b..d69139cf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -109,7 +109,12 @@ function parcelBuild(cb) { // Build the app using parcel. Since the build task finishes, we have to // listen for it to mark the gulp task as finished. - const args = ['--config', parcelConfig]; + const args = [ + '--config', + parcelConfig, + '--public-url', + process.env.PUBLIC_URL || '/' + ]; const pr = spawn('node', [parcelCli, 'build', ...args, ...parcelTarget], { stdio: 'inherit'