Skip to content

Commit

Permalink
Fix storybook on react 18
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanu1 committed Feb 16, 2024
1 parent 5456ded commit 2c78f34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { StorybookConfig } from '@storybook/react-webpack5';
import React from 'react';

const config: StorybookConfig = {
stories: [
Expand Down Expand Up @@ -40,7 +41,7 @@ const config: StorybookConfig = {
'../utils/location-operations': require.resolve('../tests/__fixtures__/utils/location-operations.ts')
},
},
externals: ["react-dom/client"]
...(!React.version.startsWith('18') && { externals: ["react-dom/client"] })
}),

env: (config) => {
Expand Down

0 comments on commit 2c78f34

Please sign in to comment.