storybookjs / bench

Storybook benchmark
MIT License
15 stars 4 forks source link

Support running against vite-builder projects #5

Closed IanVS closed 2 years ago

IanVS commented 2 years ago

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.

shilman commented 2 years ago

:rocket: PR was released in v0.7.0 :rocket: