Skip to content

Commit bfece37

Browse files
committed
fix: remove references to old way of importing withStorybook
1 parent 0f04da6 commit bfece37

File tree

11 files changed

+19
-19
lines changed

11 files changed

+19
-19
lines changed

MANUAL_SETUP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Then set `transformer.unstable_allowRequireContext` to true
128128

129129
```js
130130
const { getDefaultConfig } = require('expo/metro-config');
131-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
131+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
132132

133133
const defaultConfig = getDefaultConfig(__dirname);
134134

@@ -139,7 +139,7 @@ module.exports = withStorybook(defaultConfig);
139139

140140
```js
141141
const { getDefaultConfig } = require('@react-native/metro-config');
142-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
142+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
143143

144144
const defaultConfig = getDefaultConfig(__dirname);
145145

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ npx expo@latest customize metro.config.js
171171
copy the metro config
172172

173173
```js
174-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
174+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
175175
module.exports = withStorybook(config);
176176
```
177177

@@ -386,7 +386,7 @@ Then navigate to `/storybook` in your app to view stories.
386386
```js
387387
// metro.config.js
388388
const { getDefaultConfig } = require('expo/metro-config');
389-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
389+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
390390

391391
const defaultConfig = getDefaultConfig(__dirname);
392392

@@ -409,7 +409,7 @@ This is useful for conditionally including Storybook in development but excludin
409409
```js
410410
// metro.config.js
411411
const { getDefaultConfig } = require('expo/metro-config');
412-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
412+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
413413

414414
const defaultConfig = getDefaultConfig(__dirname);
415415

docs/docs/intro/configuration/cli-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The `withStorybook` Metro wrapper automatically runs story generation:
155155

156156
```js
157157
// metro.config.js
158-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
158+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
159159

160160
module.exports = withStorybook(config, {
161161
configPath: './.rnstorybook', // Must match CLI --config-path

docs/docs/intro/configuration/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Wrap your Metro config with the `withStorybook` function:
190190

191191
```js
192192
const { getDefaultConfig } = require('expo/metro-config');
193-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
193+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
194194

195195
const config = getDefaultConfig(__dirname);
196196
module.exports = withStorybook(config);

docs/docs/intro/configuration/metro-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `withStorybook` function is a Metro configuration wrapper that enables Story
1010

1111
```js
1212
const { getDefaultConfig } = require('expo/metro-config');
13-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
13+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
1414

1515
const config = getDefaultConfig(__dirname);
1616

docs/docs/intro/configuration/websocket-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const StorybookUIRoot = view.getStorybookUI({
3434

3535
```js
3636
// metro.config.js
37-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
37+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
3838

3939
module.exports = withStorybook(config, {
4040
websockets: {

docs/docs/intro/getting-started/expo-router.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Then update your `metro.config.js` file to include the Storybook wrapper:
2828

2929
```js
3030
const { getDefaultConfig } = require('expo/metro-config');
31-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
31+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
3232

3333
/** @type {import('expo/metro-config').MetroConfig} */
3434
const config = getDefaultConfig(__dirname);

docs/docs/intro/getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you have other config wrapper functions like `withNativeWind` you will want t
3636
```js
3737
// metro.config.js
3838
const { getDefaultConfig } = require('expo/metro-config');
39-
const withStorybook = require('@storybook/react-native/metro/withStorybook'); // <-- add this
39+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook'); // <-- add this
4040

4141
/** @type {import('expo/metro-config').MetroConfig} */
4242
const config = getDefaultConfig(__dirname);

docs/docs/intro/getting-started/manual-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Update `metro.config.js`:
9393

9494
```js
9595
const { getDefaultConfig } = require('expo/metro-config');
96-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
96+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
9797

9898
const defaultConfig = getDefaultConfig(__dirname);
9999

@@ -104,7 +104,7 @@ For React Native CLI projects:
104104

105105
```js
106106
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
107-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
107+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
108108

109109
const defaultConfig = getDefaultConfig(__dirname);
110110

packages/react-native/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ npx expo@latest customize metro.config.js
171171
copy the metro config
172172

173173
```js
174-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
174+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
175175
module.exports = withStorybook(config);
176176
```
177177

@@ -386,7 +386,7 @@ Then navigate to `/storybook` in your app to view stories.
386386
```js
387387
// metro.config.js
388388
const { getDefaultConfig } = require('expo/metro-config');
389-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
389+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
390390

391391
const defaultConfig = getDefaultConfig(__dirname);
392392

@@ -409,7 +409,7 @@ This is useful for conditionally including Storybook in development but excludin
409409
```js
410410
// metro.config.js
411411
const { getDefaultConfig } = require('expo/metro-config');
412-
const withStorybook = require('@storybook/react-native/metro/withStorybook');
412+
const { withStorybook } = require('@storybook/react-native/metro/withStorybook');
413413

414414
const defaultConfig = getDefaultConfig(__dirname);
415415

0 commit comments

Comments
 (0)