Merge pull request #21402 from storybookjs/21316-drop-require-from-docs

Docs: Use async import rather than require in docs
This commit is contained in:
Michael Shilman 2023-03-06 20:57:51 +08:00 committed by GitHub
commit a5c949a7ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,8 +96,10 @@ async function webpack(
...webpackConfig,
plugins: [
...(webpackConfig.plugins || []),
// eslint-disable-next-line global-require
...(csfPluginOptions ? [require('@storybook/csf-plugin').webpack(csfPluginOptions)] : []),
...(csfPluginOptions
? [(await import('@storybook/csf-plugin')).webpack(csfPluginOptions)]
: []),
],
module: {