full storybook (preview + manager including addons!) bundled by parceljs instead of webpack
- zero config react + typescript support (no babel, no webpack or any other config)
- glob import all stories (*.stories.ts), see ./storybook/iframe.ts
- fast bundling -- fast storybook preview bundling thanks to parceljs -- storybook manager prebuilt and included in git (approach used by snowpack and yarn 2 cache sharing), so no time spent to build it
git clone https://github.com/vasileermicioi/parcel-storybook
cd parcel-storybook
yarn install
yarn storybook
if you need more addons (now only actions and knobs) you can modify ./storybook/config/main.js
yarn rebuild-manager
yarn storybook
!! don't forget to commit newly generated files !! rebuild manager only when you need to change manager config, not the preview or stories
storybook published a standalone preview powered by parceljs (see here https://github.com/storybookjs/storybook/tree/next/examples/standalone-preview) but the example is not working with the addons because the preview is inside an iframe with different origin, (see here storybookjs/storybook#8677) cross-origin requests/communication being blocked by browsers (same domain but different port is considered another origin)
running storybook with parceljs (because of it's simplicity) seems to be a popular request storybookjs/storybook#10110 storybookjs/storybook#8677 storybookjs/storybook#5975 (comment)
main problem is to fix cross-origin communication, I was able to solve that in 2 ways
- reverse proxy both the manager and the preview so they are in the same domain
- build static manager (how often are you changing storybook config?) and serving / watching only the preview having storybook manager as static assets
so current repo is solved using second approach