Open ElSeniorMikael opened 7 months ago
Hi @ElSeniorMikael,
thank you for opening the separate issue. Could you share how does you metro.config.js
looks like?
@krystofwoldrich there's my metro.config.js
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const defaultConfig = getDefaultConfig(__dirname);
const {assetExts, sourceExts} = defaultConfig.resolver;
/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('metro-config').MetroConfig}
*/
const jsoMetroPlugin = require('obfuscator-io-metro-plugin')(
{
// for these option look javascript-obfuscator library options from above url
compact: false,
sourceMap: false,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
numbersToExpressions: true,
simplify: true,
stringArrayShuffle: true,
splitStrings: true,
stringArrayThreshold: 1,
},
{
runInDev: false /* optional */,
logObfuscatedFiles: true /* optional generated files will be located at ./.jso */,
// source Map generated after obfuscation is not useful right now
sourceMapLocation:
'./index.android.bundle.map' /* optional only works if sourceMap: true in obfuscation option */,
},
);
const config = {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
...jsoMetroPlugin,
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
Thank you @ElSeniorMikael, we'll test this config with the wizard, which should produce the same error as you are experiencing. We will keep you posted.
Environment
React-native: 0.72.3 Sentry: 5.18.0 node: 18.19.0
Steps to Reproduce
1- new react native project 2- npx @sentry/wizard@latest -s -i reactNative
Expected Result
it should not failed
Actual Result
it fail after adding the sentry init inside of App.tsx and doesnt add my sentry.property inside IOS and ANDROID folder