hey guys, i'm using storybook for creating my components. now i've build an icon component that uses server$ to read svg icons from a directory.
in storybook this is not working so i've mocked the fs package to simulate this.
I've tried to implemented a switch to detect if i should use server$
this don't work:
const wrappedReadIconFile =
process.env.STORYBOOK !== "true" ? readIconFile : server$(readIconFile);
//process.env.STORYBOOK is set by storybook config
//if i debug the condition it's good as well
this works, if i uncomment one of each lines:
const wrappedReadIconFile = server$(readIconFile);
// const wrappedReadIconFile = readIconFile;
I'm not sure what qwik is doing under the hood. but it seems that qwik is processing the code and detect this not correct.
has someone an idea what else i can do?
One idea was to mock server$ for storybook, but i had no success with that.