@lottie
To set the base href in Storybook, you can use the basePath and staticRoot options in the .storybook/main.js configuration file.
1 2 3 4 5 6 7 8 9 10 |
module.exports = {
// other Storybook configuration options
webpackFinal: async (config, { configType }) => {
// Modify the webpack config to set the base href
config.output.publicPath = '/my-app/';
return config;
},
};
|
Now, when you run your Storybook, it should use the base href you specified in the configuration file.