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 authored and yannbf committed May 7, 2024
1 parent 561ad98 commit 0ac197d
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 0ac197d

Please sign in to comment.