diff --git a/code/addons/docs/src/preset.ts b/code/addons/docs/src/preset.ts index 462e990e8e16..09679b71becb 100644 --- a/code/addons/docs/src/preset.ts +++ b/code/addons/docs/src/preset.ts @@ -50,7 +50,7 @@ async function webpack( skipCsf: true, ...mdxPluginOptions, mdxCompileOptions: { - providerImportSource: '@storybook/addon-docs/mdx-react-shim', + providerImportSource: require.resolve('@storybook/addon-docs/dist/shims/mdx-react-shim'), ...mdxPluginOptions.mdxCompileOptions, remarkPlugins: [remarkSlug, remarkExternalLinks].concat( mdxPluginOptions?.mdxCompileOptions?.remarkPlugins ?? []