mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 02:51:07 +08:00
36 lines
781 B
Plaintext
36 lines
781 B
Plaintext
---
|
|
title: 'staticDirs'
|
|
---
|
|
|
|
Parent: [main.js|ts configuration](./main-config.md)
|
|
|
|
Type: `(string | { from: string; to: string })[]`
|
|
|
|
Sets a list of directories of [static files](../configure/images-and-assets.md#serving-static-files-via-storybook-configuration) to be loaded by Storybook.
|
|
|
|
{/* prettier-ignore-start */}
|
|
|
|
<CodeSnippets
|
|
paths={[
|
|
'common/main-config-static-dirs.js.mdx',
|
|
'common/main-config-static-dirs.ts.mdx',
|
|
]}
|
|
/>
|
|
|
|
{/* prettier-ignore-end */}
|
|
|
|
## With configuration objects
|
|
|
|
You can also use a configuration object to define the directories:
|
|
|
|
{/* prettier-ignore-start */}
|
|
|
|
<CodeSnippets
|
|
paths={[
|
|
'common/main-config-static-dirs-with-object.js.mdx',
|
|
'common/main-config-static-dirs-with-object.ts.mdx',
|
|
]}
|
|
/>
|
|
|
|
{/* prettier-ignore-end */}
|