Skip to content

Commit 78eb6c2

Browse files
committed
docs: update configuration reference
1 parent 46c537c commit 78eb6c2

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

docs/configuration.md

+33-4
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,30 @@ const config: StorybookConfig = {
255255

256256
/**
257257
* Symfony framework options.
258-
*
259-
* These options only applies to the dev environment.
260258
*/
261259
symfony: {
262260
/**
263-
* Mandatory, the URL of the Symfony development server.
261+
* Mandatory, the absolute path of the Symfony application.
262+
*
263+
* If you are using Docker for your Symfony application,
264+
* it must be the absolute path inside the Docker container.
265+
* In other cases, it must be the absolute path on your host machine.
266+
*
267+
* @example '/var/www/html'
268+
*
269+
* @var string
270+
*/
271+
projectDir: '',
272+
273+
/**
274+
* Mandatory, the absolute path of the Storybook cache path.
275+
*
276+
* @var string
277+
*/
278+
storybookCachePath: path.resolve(__dirname, '../var/cache/dev/storybook'),
279+
280+
/**
281+
* Mandatory, the URL of the Symfony application server.
264282
*
265283
* @var string
266284
*/
@@ -289,7 +307,18 @@ const config: StorybookConfig = {
289307
additionalWatchPaths: [
290308
'assets',
291309
'var/tailwind/tailwind.built.css'
292-
]
310+
],
311+
312+
/**
313+
* Configure aliases for components paths resolution.
314+
*
315+
* Use this when Storybook and Symfony app are running on different hosts (like Docker).
316+
*
317+
* @var object
318+
*/
319+
templatePathAliases: {
320+
[path.resolve(__dirname, '..')]: '/var/www/html',
321+
}
293322
}
294323
},
295324
},

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)