@expo/config-plugins. All exports are available from the main package:
Core Types
ConfigPlugin
Plugin.types.ts
ExpoConfig and optional props, then returns a modified ExpoConfig.
Example:
StaticPlugin
Plugin.types.ts
app.json. The first element is the plugin (string or function), the second is props.
Example:
app.json
Mod
Plugin.types.ts
modResults (the file contents).
Example:
ModConfig
Plugin.types.ts
ExportedConfigWithProps
Plugin.types.ts
modResults: The parsed file contentsmodRequest: Metadata about the current modmodRawConfig: The original, unmodified config
Plugin Composition
withPlugins
withPlugins.ts
withRunOnce
withRunOnce.ts
createRunOncePlugin
withRunOnce.ts
iOS Plugins
withInfoPlist
ios-plugins.ts
Info.plist file.
Example:
withEntitlementsPlist
ios-plugins.ts
withXcodeProject
ios-plugins.ts
.xcodeproj).
Example:
withAppDelegate
ios-plugins.ts
AppDelegate.m file (dangerous - string manipulation).
Example:
withPodfile
ios-plugins.ts
Podfile.
withPodfileProperties
ios-plugins.ts
Podfile.properties.json (key-value pairs).
Example:
withExpoPlist
ios-plugins.ts
Expo.plist (Expo Updates configuration).
createInfoPlistPlugin
ios-plugins.ts
createEntitlementsPlugin
ios-plugins.ts
Entitlements.ts
Android Plugins
withAndroidManifest
android-plugins.ts
AndroidManifest.xml.
Example:
withStringsXml
android-plugins.ts
android/app/src/main/res/values/strings.xml.
Example:
withAndroidColors
android-plugins.ts
android/app/src/main/res/values/colors.xml.
withAndroidColorsNight
android-plugins.ts
android/app/src/main/res/values-night/colors.xml.
withAndroidStyles
android-plugins.ts
android/app/src/main/res/values/styles.xml.
withMainActivity
android-plugins.ts
MainActivity.java file (dangerous - string manipulation).
withMainApplication
android-plugins.ts
MainApplication.java file (dangerous - string manipulation).
withAppBuildGradle
android-plugins.ts
android/app/build.gradle.
Example:
withProjectBuildGradle
android-plugins.ts
android/build.gradle.
withSettingsGradle
android-plugins.ts
android/settings.gradle.
withGradleProperties
android-plugins.ts
android/gradle.properties as key-value pairs.
Example:
createAndroidManifestPlugin
android-plugins.ts
createStringsXmlPlugin
android-plugins.ts
Advanced Mods
withMod
withMod.ts
withDangerousMod
withDangerousMod.ts
withBaseMod
withMod.ts
Mod Compilation
compileModsAsync
mod-compiler.ts
evalModsAsync
mod-compiler.ts
Helper Utilities
WarningAggregator
CodeGenerator
generateCode.ts
PluginError
errors.ts
Platform-Specific Configs
AndroidConfig
IOSConfig
Next steps
- Modifying native projects - Platform-specific guides
- Testing plugins - Test strategies
- Creating plugins - Build your own plugins