mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
Merge pull request #10402 from Yama-Tomo/fixed-webpackFinal-being-called-twice
Fixed `webpackFinal` being called twice
This commit is contained in:
commit
bc5788c67b
@ -20,15 +20,11 @@ export async function webpack(config, options) {
|
||||
// return the (extended) base configuration if it's not available.
|
||||
const customConfig = loadCustomWebpackConfig(configDir);
|
||||
|
||||
if (customConfig === null) {
|
||||
logger.info('=> Using default Webpack setup.');
|
||||
return createFinalDefaultConfig(presets, config, options);
|
||||
}
|
||||
|
||||
if (typeof customConfig === 'function') {
|
||||
logger.info('=> Loading custom Webpack config (full-control mode).');
|
||||
return customConfig({ config: finalDefaultConfig, mode: configType });
|
||||
}
|
||||
|
||||
logger.info('=> Using default Webpack setup.');
|
||||
return finalDefaultConfig;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user