storybook/docs/snippets/common/storybook-main-versioned-webpack.js.mdx
2021-11-04 21:29:03 +00:00

11 lines
295 B
Plaintext

```js
// .storybook/main.js
export function webpackFinal(config, { presets }) {
const version = await presets.apply('webpackVersion');
const instance = (await presets.apply('webpackInstance'))?.default;
logger.info(`=> Running in webpack ${version}: ${instance}`);
return config;
}
```