Skip to content

Instantly share code, notes, and snippets.

@nderscore
Created August 14, 2023 03:36
Show Gist options
  • Save nderscore/b0717eb29a99e7ed4cd93777060dee24 to your computer and use it in GitHub Desktop.
Save nderscore/b0717eb29a99e7ed4cd93777060dee24 to your computer and use it in GitHub Desktop.
tamagui-typescript-plugin workaround for expo-only

Workaround for Expo-only usage

This is hopefully a temporary workaround to enable Expo-only users to use tamagui-typescript-plugin

  1. Add @tamagui/static to your project

    yarn add @tamagui/static
    
  2. Create a script generate-tamagui-json.js (fill in with your settings if needed)

// generate-tamagui-json.js
const { loadTamagui } = require('@tamagui/static');

loadTamagui({
  config: 'tamagui.config.ts',
  components: ['tamagui'],
});
  1. Execute node generate-tamagui-json.js to generate .tamagui/tamagui.config.json in your Expo project folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment