Skip to content

Commit

Permalink
Fix CRA not respecting storybook import condition names.
Browse files Browse the repository at this point in the history
  • Loading branch information
JReinhold committed May 7, 2024
1 parent 34965c6 commit 4673794
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/presets/create-react-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ const webpack = async (
...getModulePath(CWD),
],
plugins: [PnpWebpackPlugin as any],
// manual copy from builder-webpack because defaults are disabled in this CRA preset
conditionNames: [
...(webpackConfig.resolve?.conditionNames ?? []),
'storybook',
'stories',
'test',
'...',
],
},
resolveLoader,
} as Configuration;
Expand Down

0 comments on commit 4673794

Please sign in to comment.