Skip to content

Commit 26e9f49

Browse files
committed
docs: update configuration reference
1 parent dc17a81 commit 26e9f49

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

docs/configuration.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,26 @@ const config: StorybookConfig = {
259259
* These options only applies to the dev environment.
260260
*/
261261
symfony: {
262+
/**
263+
* Mandatory, the absolute path of the Symfony application.
264+
*
265+
* If you are using Docker for your Symfony application,
266+
* it must be the absolute path inside the Docker container.
267+
* In other cases, it must be the absolute path on your host machine.
268+
*
269+
* @example '/var/www/html'
270+
*
271+
* @var string
272+
*/
273+
projectDir: '',
274+
275+
/**
276+
* Mandatory, the absolute path of the Storybook cache path.
277+
*
278+
* @var string
279+
*/
280+
storybookCachePath: path.resolve(__dirname, '../var/cache/dev/storybook'),
281+
262282
/**
263283
* Mandatory, the URL of the Symfony development server.
264284
*
@@ -289,7 +309,18 @@ const config: StorybookConfig = {
289309
additionalWatchPaths: [
290310
'assets',
291311
'var/tailwind/tailwind.built.css'
292-
]
312+
],
313+
314+
/**
315+
* Configure aliases for components paths resolution.
316+
*
317+
* Use this when Storybook and Symfony app are running on different hosts (like Docker).
318+
*
319+
* @var object
320+
*/
321+
templatePathAliases: {
322+
[path.resolve(__dirname, '..')]: '/var/www/html',
323+
}
293324
}
294325
},
295326
},

docs/static-build.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Storybook can be built in a static application, to be deployed on a simple web server. The build will contain all stories metadata and the JavaScript used to render the Storybook UI.
44

5+
> ⚠️ In order to build Storybook, you need to have a running Symfony server.
6+
> The Symfony server is used to generate "preview.html.twig" iframe.
7+
58
## Build Storybook
69

710
To build Storybook, use:

0 commit comments

Comments
 (0)