Socket
Socket
Sign inDemoInstall

@expo/prebuild-config

Package Overview
Dependencies
11
Maintainers
23
Versions
116
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/prebuild-config

Get the prebuild config


Version published
Weekly downloads
806K
increased by12.88%
Maintainers
23
Install size
9.05 MB
Created
Weekly downloads
 

Package description

What is @expo/prebuild-config?

@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.

What are @expo/prebuild-config's main functionalities?

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;
    }
  ]);
};

Other packages similar to @expo/prebuild-config

Readme

Source

👋 Welcome to
@expo/prebuild-config

Get the modified config for expo prebuild.

Keywords

FAQs

Last updated on 09 May 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc