Interview frequency: …
Short answer
They are JavaScript/TypeScript functions that run during npx expo prebuild and automatically modify native build files (such as Info.plist, AndroidManifest.xml, and build.gradle) without manual edits.
Explanation
Config Plugins let external libraries move their native configuration into app.json or app.config.js. A developer can write a custom plugin to add permissions, change build settings, or inject code into startup code (AppDelegate/MainActivity), keeping the code clean and avoiding human error.
Code example
// Example of a custom Plugin that modifies Info.plist programmatically:
const { withInfoPlist } = require('@expo/config-plugins');
const withCustomSetting = (config) => {
return withInfoPlist(config, (config) => {
config.modResults.NSMicrophoneUsageDescription = "We need the microphone to record voice messages";
return config;
});
};
module.exports = withCustomSetting;Common mistakes
- Trying to write complex Config Plugins that modify arbitrary text with regex instead of using the official structural Modifiers.
Follow-up questions
- What is the modern Expo architecture, and what is Continuous Native Generation (CNG)?
- What are the strict acceptance requirements and tests for App Clips (iOS) and Instant Apps (Android) in Expo?