The assets generated by vite differ somewhat from webpack's, so a few tweaks were needed here in order to accommodate @storybook/builder-vite projects.
This tool does not have knowledge of which builder is being used, so one side-effect is that it will no longer throw an error if preview files are missing from a webpack build. I'm not sure whether that's a show stopper or not here, but I was trying to avoid making any architectural changes.
One other minor change that isn't directly related to vite, is that I used a Promise.all() rather than multiple awaits which result in a promise chain. This should help performance of the tool itself slightly.
The assets generated by vite differ somewhat from webpack's, so a few tweaks were needed here in order to accommodate @storybook/builder-vite projects.
This tool does not have knowledge of which builder is being used, so one side-effect is that it will no longer throw an error if
preview
files are missing from a webpack build. I'm not sure whether that's a show stopper or not here, but I was trying to avoid making any architectural changes.One other minor change that isn't directly related to vite, is that I used a
Promise.all()
rather than multipleawait
s which result in a promise chain. This should help performance of the tool itself slightly.