From be12c945fa1a6b051f1dc5ab89b47f0cb4188cbe Mon Sep 17 00:00:00 2001 From: Hippo Date: Mon, 26 Jul 2021 22:43:25 +0530 Subject: [PATCH] Account for null values in config.basePath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of reading them as a literal string 'null' it now blanks them out. Otherwise we were getting errors like "publicnull does not exist"! 😬 --- server.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 0e58347..5ebe950 100644 --- a/server.js +++ b/server.js @@ -34,12 +34,15 @@ let options = { metaInfo: { title: 'Seance', script: [ - { type: 'text/javascript', src: config.basePath + '/app.js' }, + { + type: 'text/javascript', + src: (config.basePath || '') + '/app.js' + }, ], }, extractCSS: true, cssOutputPath: '/css/styles.css', - publicPath: 'public' + config.basePath, + publicPath: 'public' + (config.basePath || ''), compilerConfig: { // custom webpack config },