Comments (8)
That's odd, it's the same with popmotion
. I don't know enough about this to be able to fix it right away, will have to do some debugging.
from moti.
I've published new versions of popmotion
and framer-motion
with the preserveModules: true
which helps Webpack code-splitting ES modules. So 3.8.0
should have a minimal footprint for AnimatePresence
(about 2.5kb)
from moti.
Hmm that's interesting, I didn't know that.
@mattgperry curious if you have thoughts here. I'm using the usePresence
hook in each component, so I'm assuming that's importing all of framer motion. Is there a better way to do this?
Tree shaking on React Native Web is incredibly hard to maintain. It takes very little to mess it up, so it's not very reliable.
from moti.
I actually just added sideEffects: false
to package.json
in the latest version, will that help?
from moti.
Yeah it should do it in principle. I'll update and try pushing that out, thanks for the quick response here.
from moti.
https://bundlephobia.com/[email protected]
Hmm sideEffects: false
doesn't help. Each export has the same size as whole bundle.
from moti.
Webpack's tree shaking is something I've had trouble finding good content on. Besides a short explanation on their docs saying that you should use sideEffects: false
, I haven't seen too much. I also don't know enough about this.
@mattgperry if you need any help figuring this out for Framer, let me know.
from moti.
Thanks to @mattgperry's update, moti
is now down to 4.4kb gzipped: https://bundlephobia.com/[email protected]
yarn add moti
@gut4 thanks for bringing this to my attention.
from moti.
Related Issues (20)
- useDynamicAnimation initial state when screen re-mount HOT 12
- How to use <Skeleton> with Flatlist? HOT 6
- Skeleton makes navigation transitions slow by 200-400ms HOT 18
- (Workaround) Next.js without SWC plugin HOT 5
- RFC: Granular animation callbacks
- RFC: Built-in Moti + SVG Integration
- Module '"moti/interactions"' has no exported member 'MotiPressable'. HOT 4
- MotiView with NativeWind throws redundant errors when tansfroming HOT 9
- Typescript support motifySvg HOT 10
- Exit Animation not showing in FlatList HOT 4
- Skeleton covers children when show={false} on web HOT 4
- Examples on Stakblitz do not work HOT 4
- Skeleton.Group is broken HOT 2
- Skeloton erroring in web HOT 4
- Expo Web not working HOT 8
- does not work with react-native-web 0.19 HOT 4
- 0.25 and reanimated 2 HOT 19
- Skeleton Animation - cannot find module moti/skeleton HOT 4
- Sequences get out of sync HOT 3
- question about multi transtion HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moti.