Hey all, the last hurdle before we can move everything from webpack to vite is here and I have been going in circles trying to solve it. Everything works great in our project however, chromatic fails on CI and i've tracked down the error to something happening with build-storybook.
process so far
- updated storybook 6 => 7
a. updated webpack5 to vite - run in dev, works like a charm
- ran chromatic locally (failure)
- checked storybook static running locally using http-server (as per docs) same error
right now I'm getting a build error in preview.js as its not finding the right chunk.
here's the main.js
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
"addons": [{
name: '@storybook/preset-scss',
options: {
cssLoaderOptions: {
modules: true
}
}
},
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-a11y",
"storybook-addon-designs"
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: true
}
};
If anyone can point me in the right direction that would be fantastic. Thank you 🙂