From 21b933dd2feba6be9fb97a22a4b10acdd3e3a4aa Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Wed, 29 Nov 2023 09:46:14 +0100 Subject: [PATCH] Fix exclude regex in react-docgen-loader --- .../react-webpack/src/framework-preset-react-docs.test.ts | 4 ++-- code/presets/react-webpack/src/framework-preset-react-docs.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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/, }, ], },