This commit is contained in:
Norbert de Langen 2022-10-06 13:21:57 +02:00
parent 640301f563
commit ca7dd1dc32
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762
2 changed files with 3 additions and 3 deletions

View File

@ -127,7 +127,7 @@ const starter: StarterFunction = async function* starterGeneratorFn({
router.use(`/sb-addons`, express.static(addonsDir));
router.use(`/sb-manager`, express.static(coreDirOrigin));
const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation.outputFiles);
const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation?.outputFiles);
yield;
@ -192,7 +192,7 @@ const builder: BuilderFunction = async function* builderGeneratorFn({ startTime,
yield;
const managerFiles = copy(coreDirOrigin, coreDirTarget);
const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation.outputFiles);
const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation?.outputFiles);
yield;

View File

@ -3,7 +3,7 @@ import { writeFile, ensureFile } from 'fs-extra';
import { join } from 'path';
import { Compilation } from '../types';
export async function readOrderedFiles(addonsDir: string, outputFiles: Compilation['outputFiles']) {
export async function readOrderedFiles(addonsDir: string, outputFiles: Compilation['outputFiles'] | undefined) {
const files = await Promise.all(
outputFiles?.map(async (file) => {
// convert deeply nested paths to a single level, also remove special characters