Replies: 1 comment
-
|
I've been able to achieve this kind of thing in a Nuxt app with aliasing. e.g. alias: {
'~/logic/storage': resolve(__dirname, './path/to/myStorageMock.ts'),
}You'll have to make sure it only runs in histoire context. I couldn't set the alias in the histoire config itself - I wound up setting a process.env flag (e.g. But it probably depends on your specific app. I would maybe try it in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi ! Thanks for Histoire, it's really awesome !
I got a library that I want to replace when my component is mounted inside Histoire.
Here is a really simple example :
I want to create a Story for this component, but I want to replace the provided values done by the
~/logic/storagefile.In fact, I even want to not import this file because it contains imported libs that break Histoire.
How can I replace or mock this file in Histoire only ? Could I do that with Histoire or Vite ?
Beta Was this translation helpful? Give feedback.
All reactions