Skip to content

Commit

Permalink
Fix storybook config (#182283)
Browse files Browse the repository at this point in the history
Storybook is attempting to load an esm after the merge of #182244. This
updates the webpack configuration to only load files from the browser
and main properties.
  • Loading branch information
jbudz authored May 1, 2024
1 parent 24e5b3a commit 869402b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/kbn-storybook/src/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ export default ({ config: storybookConfig }: { config: Configuration }) => {
stats,
};

// Override storybookConfig mainFields instead of merging with config
delete storybookConfig.resolve?.mainFields;

const updatedModuleRules = [];
// clone and modify the module.rules config provided by storybook so that the default babel plugins run after the typescript preset
for (const originalRule of storybookConfig.module?.rules ?? []) {
Expand Down

0 comments on commit 869402b

Please sign in to comment.