mirror of
https://github.com/luxfi/wallet.git
synced 2026-10-30 15:13:19 +00:00
Copies apps/extension, apps/mobile and 10 pkgs (wallet, ui, config, utilities, sessions, gating, notifications, analytics, eslint-config, prices) into a standalone pnpm workspace. Resolves merge conflict markers in extension and mobile package.json files, strips build artifacts (.wxt, .output, Pods).
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
const withStorybook = require('@storybook/react-native/metro/withStorybook')
|
|
const { mergeConfig } = require('@react-native/metro-config')
|
|
const { getDefaultConfig: getExpoDefaultConfig } = require('expo/metro-config')
|
|
|
|
const defaultConfig = getExpoDefaultConfig(__dirname)
|
|
|
|
const {
|
|
resolver: { sourceExts, assetExts },
|
|
} = defaultConfig
|
|
|
|
// Only customize necessary fields for SVG and Storybook support
|
|
const customConfig = {
|
|
resolver: {
|
|
assetExts: assetExts.filter((ext) => ext !== 'svg'),
|
|
sourceExts: [...sourceExts, 'svg', 'cjs'],
|
|
},
|
|
transformer: {
|
|
babelTransformerPath: require.resolve('react-native-svg-transformer'),
|
|
getTransformOptions: async () => ({
|
|
transform: {
|
|
experimentalImportSupport: false,
|
|
inlineRequires: true,
|
|
},
|
|
}),
|
|
},
|
|
}
|
|
|
|
const IS_STORYBOOK_ENABLED = process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test'
|
|
|
|
module.exports = withStorybook(mergeConfig(getExpoDefaultConfig(__dirname), defaultConfig, customConfig), {
|
|
enabled: IS_STORYBOOK_ENABLED,
|
|
onDisabledRemoveStorybook: true,
|
|
configPath: require('path').resolve(__dirname, './.storybook'),
|
|
})
|