presets
presets copied to clipboard
【question】Is there a way to set global Decorator and Parameters in preset ?
I am writing a preset to make my config reuseable, I find There is a lot config in the .storybook/config.js
file, I want move it to the preset, but I had not find a way to do it on the doc, is it possible ?
Thanks in advance.
I find config hook in the source code, This is what I do.
// my-preset.js
module.exports = {
config: function(config){
return [...config, require.resolve('./config.js')];
}
}
Works fine, but you can not use require.context
API in the file, maybe It is out of the project dir, webpack does not process it.
Sorry, It work not fine, I find the addon and manage use different channel
, case data not update.
Could someone tell how split the config out ?