storybook/lib/core-webpack/src/load-custom-webpack-config.ts
2022-05-11 23:28:31 +08:00

8 lines
293 B
TypeScript

import path from 'path';
import { serverRequire } from '@storybook/core-common';
const webpackConfigs = ['webpack.config', 'webpackfile'];
export const loadCustomWebpackConfig = (configDir: string) =>
serverRequire(webpackConfigs.map((configName) => path.resolve(configDir, configName)));