0.0.1 • Published 12 months ago

@wundergraph/metro-config v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

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.