Please provide the following:
- SDK Version:3.13.1
- Platforms(Android/iOS/web/all): Android
Is it possible to introduce MetroPlugin to Expo?
Please provide the following:
Is it possible to introduce MetroPlugin to Expo?
hi! can you clarify the question? what precisely are you trying to accomplish?
I want to introduce a Metro plugin that hooks into the bundle process and protects the output bundle.
oh i see. yeah you can configure it in the same way as you could with any react-native app, just add this to app.json to point to the config:
{
“expo”: {
“packagerOpts”: {
“config”: “metro.config.js”
}
}
}
Thank you for your reply.
However, the following error occurred.
Bundle output path not found.
Metro Bundler process exited with code 4294967295
The contents of metro.config.js are here.
// metro.config.js
const pjsdMetroPlugin = require('@preemptive/pjsd-metro-plugin')(
// --PJSD configuration
{
configurationFile: './pjsd.config.json', // Path to the configuration file if any or you could put your configuration directly here
quietMode: false, // Display protection logs
protectUserModulesOnly: false /* Other PJSD options e.g. booleanLiterals, stringLiterals etc. could also be provided here */, // If false the whole bundle will be protected, otherwise only the "first-party" application code
}, // --Metro configuration
{
resolver: {
/* resolver Metro options */
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
serializer: {
/* serializer Metro options */
},
server: {
/* server Metro options */
} /* general Metro options */,
},
);
module.exports = pjsdMetroPlugin;
i’m not familiar with that plugin and can’t provide support for it sorry!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.