Error: base must be a non-empty string, or null/undefined.

pull/109608/head
Martin Aeschlimann 2020-10-26 20:22:34 +01:00
parent c6d1ba6cee
commit a2a0fe56a0
1 changed files with 2 additions and 2 deletions

View File

@ -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;