storybook/docs/snippets/common/storybook-main-webpackfinal-example.js.mdx
2020-08-11 01:11:41 +01:00

13 lines
333 B
Plaintext

```js
//.storybook/main.js
export function webpackFinal(config, { configDir }) {
if (!isReactScriptsInstalled()) {
logger.info('=> Using base config because react-scripts is not installed.');
return config;
}
logger.info('=> Loading create-react-app config.');
return applyCRAWebpackConfig(config, configDir);
}
```