@wundergraph/metro-config
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

WunderGraph Metro Config

wunderctl

Official WunderGraph Metro Config for React Native and Expo.

Getting Started

npm install @wundergraph/metro-config

Configuration

metro.config.js

// Learn more https://docs.expo.io/guides/customizing-metro
const { wgMetroConfig } = require('@wundergraph/metro-config');
const { getDefaultConfig } = require('expo/metro-config');

const config = getDefaultConfig(__dirname);

module.exports = wgMetroConfig(config);

Advanced

In case you have a custom Metro transformer configured, you can import the WunderGraph transformer and add it to your custom transformer.

// custom-transformer.js
const { transform } = require('@wundergraph/metro-config/transformer');

module.exports = {
  transform(file) {
    // custom transforms

    return transform(file);
  },
};

Usage

After configuration the metro config you can use @wundergraph/swr or @wundergraph/react-query in your React Native or Expo project.

Package Sidebar

Install

npm i @wundergraph/metro-config

Weekly Downloads

33

Version

0.0.1

License

Apache-2.0

Unpacked Size

7.14 kB

Total Files

6

Last publish

Collaborators

  • starptech
  • jens-wundergraph