mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 06:51:17 +08:00
Merge pull request #17544 from storybookjs/fix/docs-preset-babel-handling
Addon-docs: Fix preset handling for builder with options
This commit is contained in:
commit
529daacf90
@ -44,8 +44,8 @@ export async function webpack(
|
||||
|
||||
const builderName = typeof builder === 'string' ? builder : builder.name;
|
||||
const resolvedBabelLoader = require.resolve('babel-loader', {
|
||||
paths: builderName.match(/(webpack4|webpack5)/)
|
||||
? [require.resolve(`@storybook/builder-${builder}`)]
|
||||
paths: builderName.match(/^webpack(4|5)$/)
|
||||
? [require.resolve(`@storybook/builder-${builderName}`)]
|
||||
: [builderName],
|
||||
});
|
||||
|
||||
|
@ -22,7 +22,7 @@ const config: StorybookConfig = {
|
||||
},
|
||||
},
|
||||
core: {
|
||||
builder: 'webpack4',
|
||||
builder: { name: 'webpack4' },
|
||||
channelOptions: { allowFunction: false, maxDepth: 10 },
|
||||
},
|
||||
features: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user