From a2a0fe56a02cc7581014d4d6e6c5df0362e8be2a Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 26 Oct 2020 20:22:34 +0100 Subject: [PATCH] Error: base must be a non-empty string, or null/undefined. --- build/lib/optimize.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts index 2822803f9f7..86400889de8 100644 --- a/build/lib/optimize.ts +++ b/build/lib/optimize.ts @@ -67,7 +67,7 @@ function loader(src: string, bundledFileHeader: string, bundleLoader: boolean): isFirst = false; this.emit('data', new VinylFile({ path: 'fake', - base: '', + base: '.', contents: Buffer.from(bundledFileHeader) })); this.emit('data', data); @@ -102,7 +102,7 @@ function toConcatStream(src: string, bundledFileHeader: string, sources: bundle. const treatedSources = sources.map(function (source) { const root = source.path ? REPO_ROOT_PATH.replace(/\\/g, '/') : ''; - const base = source.path ? root + `/${src}` : ''; + const base = source.path ? root + `/${src}` : '.'; const path = source.path ? root + '/' + source.path.replace(/\\/g, '/') : 'fake'; const contents = source.path ? fileContentMapper(source.contents, path) : source.contents;