Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@expo/prebuild-config
Advanced tools
@expo/prebuild-config is a package that helps you manage and customize the native configuration of your Expo project. It allows you to modify native files and settings before building your project, making it easier to integrate custom native code and settings.
Modifying AndroidManifest.xml
This feature allows you to modify the AndroidManifest.xml file of your Expo project. You can use it to add, remove, or change elements in the manifest file.
const { withAndroidManifest } = require('@expo/config-plugins');
module.exports = function withCustomAndroidManifest(config) {
return withAndroidManifest(config, async config => {
const androidManifest = config.modResults;
// Modify the AndroidManifest.xml here
return config;
});
};
Modifying Info.plist
This feature allows you to modify the Info.plist file of your Expo project. You can use it to add, remove, or change properties in the plist file.
const { withInfoPlist } = require('@expo/config-plugins');
module.exports = function withCustomInfoPlist(config) {
return withInfoPlist(config, config => {
const infoPlist = config.modResults;
// Modify the Info.plist here
return config;
});
};
Adding custom native code
This feature allows you to add or modify custom native code in your Expo project. You can use it to include custom Objective-C, Swift, Java, or Kotlin code in your project.
const { withDangerousMod } = require('@expo/config-plugins');
const fs = require('fs');
const path = require('path');
module.exports = function withCustomNativeCode(config) {
return withDangerousMod(config, [
'ios',
async config => {
const filePath = path.join(config.modRequest.platformProjectRoot, 'path/to/your/file.m');
const fileContent = fs.readFileSync(filePath, 'utf-8');
// Modify the native code here
fs.writeFileSync(filePath, fileContent);
return config;
}
]);
};
react-native-config allows you to manage environment-specific configurations for your React Native app. It provides a way to use different configurations for different environments, such as development, staging, and production. Unlike @expo/prebuild-config, it focuses on managing environment variables rather than modifying native files.
react-native-ultimate-config is another package for managing environment-specific configurations in React Native apps. It supports both iOS and Android and allows you to define environment variables in a single place. It is similar to react-native-config but offers additional features like type safety and better integration with TypeScript.
react-native-code-push is a service that allows you to deploy mobile app updates directly to your users' devices. It enables you to push updates to JavaScript code and assets without going through the app store review process. While it doesn't modify native files like @expo/prebuild-config, it provides a way to manage and deploy updates efficiently.
Get the modified config for expo prebuild
.
FAQs
Get the prebuild config
The npm package @expo/prebuild-config receives a total of 1,037,564 weekly downloads. As such, @expo/prebuild-config popularity was classified as popular.
We found that @expo/prebuild-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 27 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.