storybook/docs/snippets/svelte/storybook-preview-global-loader.js.mdx
2021-05-07 18:07:39 +01:00

11 lines
206 B
Plaintext

```js
// .storybook/preview.js
import fetch from 'node-fetch';
export const loaders = [
async () => ({
currentUser: (await fetch('https://jsonplaceholder.typicode.com/users/1')).json(),
}),
];
```