A Next.js playground to test Reanimated bundle size.
Here we can test react-native-reanimated
's bundle size.
git clone https://github.com/nandorojo/reanimated-tree-shaking.git
yarn
yarn dev
to view the website locally on localhost:3000
yarn analyze
to view the bundle size results (it will open automatically in
your browser).
a. Be sure to look in the logs in your terminal to see page sizes too.
Open lib/react-native-reanimated
and edit the src
folder to see changes, and keep building.
npx create-next-app --example with-react-native-web rea-tree
cd rea-tree
yarn add react-native-reanimated @expo/next-adapter
yarn add -D @next/bundle-analyzer next-transpile-modules
next.config.js
andbabel.config.js
by following the Solito's starterpages/reanimated.js
pages/index.js
, use Animated.View
instead of View
node_modules/react-native-reanimated
-> lib/react-native-reanimated
Common
, ios
and android
folders since these aren't used on Webreact-native-reanimated
-> lib/react-native-reanimated/src/Animated.js
in next.config.js
so that we can debug more easily, since node_modules
are cached and compiled.