How to define the base path of Storybook build, needed for publish or deploy in Github pages #219
Answered
by
Andres6936
Andres6936
asked this question in
Q&A
-
|
In the file: export default {
stories: [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
],
addons: ['@storybook/addon-essentials', 'storybook-addon-rslib'],
framework: 'storybook-react-rsbuild',
rsbuildFinal: (config) => {
config.output.publicPath = "/Foo"; // NOT WORKING
return config
},
}; |
Beta Was this translation helpful? Give feedback.
Answered by
Andres6936
Jan 16, 2025
Replies: 1 comment
-
|
I found the solution in the docs: https://storybook.rsbuild.dev/guide/faq.html#deploy-storybook-to-a-subdirectory--subpath export default {
stories: [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
],
addons: ['@storybook/addon-essentials', 'storybook-addon-rslib'],
framework: 'storybook-react-rsbuild',
rsbuildFinal: (config) => {
config.output ??= {}
config.output.assetPrefix = (process.env.BASE_PATH || '') + '/'
// Customize the final Rsbuild config here
return config
},
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Andres6936
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found the solution in the docs: https://storybook.rsbuild.dev/guide/faq.html#deploy-storybook-to-a-subdirectory--subpath