Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Fix symlinks in static dir when building static Storybook #14448

Merged
merged 1 commit into from Apr 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/core-server/src/utils/copy-all-static-files.ts
Expand Up @@ -15,7 +15,11 @@ export async function copyAllStaticFiles(staticDirs: any[] | undefined, outputDi

// Storybook's own files should not be overwritten, so we skip such files if we find them
const skipPaths = ['index.html', 'iframe.html'].map((f) => path.join(targetPath, f));
await fs.copy(staticPath, targetPath, { filter: (_, dest) => !skipPaths.includes(dest) });
await fs.copy(staticPath, targetPath, {
dereference: true,
preserveTimestamps: true,
filter: (_, dest) => !skipPaths.includes(dest),
});
} catch (e) {
logger.error(e.message);
process.exit(-1);
Expand Down