diff --git a/code/presets/react-webpack/src/framework-preset-react-docs.test.ts b/code/presets/react-webpack/src/framework-preset-react-docs.test.ts index e3dac587cb54..bfdcd7851e07 100644 --- a/code/presets/react-webpack/src/framework-preset-react-docs.test.ts +++ b/code/presets/react-webpack/src/framework-preset-react-docs.test.ts @@ -43,7 +43,7 @@ describe('framework-preset-react-docgen', () => { module: { rules: [ { - exclude: /node_modules\/.*/, + exclude: /node_modules/, loader: '@storybook/preset-react-webpack/dist/loaders/react-docgen-loader', options: { babelOptions: { plugins: [], presets: [] } }, test: /\.(cjs|mjs|tsx?|jsx?)$/, @@ -88,7 +88,7 @@ describe('framework-preset-react-docgen', () => { module: { rules: [ { - exclude: /node_modules\/.*/, + exclude: /node_modules/, loader: '@storybook/preset-react-webpack/dist/loaders/react-docgen-loader', options: { babelOptions: { plugins: [], presets: [] } }, test: /\.(cjs|mjs|jsx?)$/, diff --git a/code/presets/react-webpack/src/framework-preset-react-docs.ts b/code/presets/react-webpack/src/framework-preset-react-docs.ts index 1260d08eaf40..321e032f43d5 100644 --- a/code/presets/react-webpack/src/framework-preset-react-docs.ts +++ b/code/presets/react-webpack/src/framework-preset-react-docs.ts @@ -35,7 +35,7 @@ export const webpackFinal: StorybookConfig['webpackFinal'] = async ( options: { babelOptions, }, - exclude: /node_modules\/.*/, + exclude: /node_modules/, }, ], }, @@ -61,7 +61,7 @@ export const webpackFinal: StorybookConfig['webpackFinal'] = async ( options: { babelOptions, }, - exclude: /node_modules\/.*/, + exclude: /node_modules/, }, ], },