You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Storybook configuration, there is an option called previewMainTemplate which is intended to allow users to override the default template.ejs used by the Storybook build-manager when creating the main index.html of the standalone application.
However, when a custom path to an .ejs template is provided for the previewMainTemplate option and either storybook build or storybook dev is run, the custom template is not utilized as expected. Instead, the build process continues to use the default template.ejs , ignoring the previewMainTemplate configuration.
Wait for the execution of yarn build-storybook or execute it manually in the integrated terminal
Open the generated storybook-static/index.html a
Compare the mentioned file with .storybook/customIndex.ejs template if the correct changes are being applied from the template to the static html file.
Describe the bug
In the Storybook configuration, there is an option called previewMainTemplate which is intended to allow users to override the default template.ejs used by the Storybook build-manager when creating the main index.html of the standalone application.
However, when a custom path to an .ejs template is provided for the previewMainTemplate option and either
storybook build
orstorybook dev
is run, the custom template is not utilized as expected. Instead, the build process continues to use the defaulttemplate.ejs
, ignoring the previewMainTemplate configuration.Reproduction link
https://stackblitz.com/edit/github-sbmzvp?file=.storybook%2FcustomIndex.ejs&view=editor
Reproduction steps
yarn build-storybook
or execute it manually in the integrated terminalstorybook-static/index.html
a.storybook/customIndex.ejs
template if the correct changes are being applied from the template to the static html file.System
Additional context
This is happening because in this line
storybook/code/builders/builder-manager/src/utils/data.ts
Line 18 in 56b17c6
the value of the the path to the template is being harcoded and resolved to the template.ejs of the library instead of resolving from the options.
In the meantime I provided a turn around while I work in the solution
#28301
The text was updated successfully, but these errors were encountered: