expo / vector-icons

https://icons.expo.fyi
MIT License
648 stars 114 forks source link

Update transpilation to remove import/export syntax from base package #189

Open EvanBacon opened 2 years ago

EvanBacon commented 2 years ago

The JS engines that we use with React Native do not support import/export syntax so we essentially offload the changes in this PR to be performed locally on every user's machine. This doesn't fully fix the package since the vendor still has es modules.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/expoio/vector-icons/am6rgMr9uB6jAP4oXoixApc6Cd3Q
✅ Preview: https://vector-icons-git-evanbacon-update-transpilation-expoio.vercel.app

brentvatne commented 2 years ago

my only concern about this is that, unless i'm mistaken, there is a minor breaking change -- if someone was, for some reason, using cjs to import a font directly we won't have default anymore:

// This won't work anymore
const AntDesign = require('@expo/vector-icons/AntDesign').default;
Simek commented 12 months ago

@EvanBacon Do we still need this refactor?