storybook/docs/snippets/common/storybook-main-webpackfinal-example.js.mdx
2020-10-07 12:23:34 +08:00

13 lines
334 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);
}
```