Open mitow7821 opened 3 years ago
Not sure why this fails... I don't use Chromatic. @shilman can somebody from Chromatic take a look?
On your dev machine, try:
yarn build-storybook
npx http-server storybook-static
Does that work for you? If it does, Chromatic should also work (in theory, in practice there might be subtle differences in the Vite bundle that screw things up?)
Using config.build.target = "";
works on production, but gives error on development:
Cannot set property 'target' of undefined
I've made it work on dev only after changing it to:
if (configType === "DEVELOPMENT") {
config.build = {};
}
config.build.target = "";
I'am using async viteFinal(config, { configType }) { config.build.target = ""; return config } but if I try run storybook this error shows:
image so I've changed config to config.build = {}; config.build.target = ""; and error disapear, but when i try to deploy stories with chromatic I am getting error because of this two lines (first config works fine in this case)
How to define build.target in config to make it work properly?