mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 05:41:06 +08:00
fix
This commit is contained in:
parent
640301f563
commit
ca7dd1dc32
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user