-
-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Description
When adding storybook to the metro.config.json
This error is seen:
Expo: "expo": "^54.0.27",
Storybook version: "storybook": "^10.1.4",
const { getDefaultConfig } = require('expo/metro-config');
const { withNativeWind } = require('nativewind/metro');
const {
withStorybook,
} = require('@storybook/react-native/metro/withStorybook');
const config = getDefaultConfig(__dirname);
const { transformer, resolver } = config;
const transformedResolvedConfig = {
transformer: {
...transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
...resolver,
assetExts: resolver.assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...resolver.sourceExts, 'ts', 'tsx', 'js', 'jsx', 'svg'],
},
};
const nativeWindConfig = withNativeWind(transformedResolvedConfig, {
input: './global.css',
});
//this must be commented out
// const storybookconfig = withStorybook(nativeWindConfig);
module.exports = nativeWindConfig;
Metadata
Metadata
Assignees
Labels
No labels