feat: reduce framer-motion bundle size

This commit is contained in:
thecodrr
2020-09-21 10:20:21 +05:00
parent ae189a95b7
commit 808f253462
2 changed files with 8 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { motion } from "framer-motion";
import { m as motion } from "framer-motion";
import * as Rebass from "rebass";
export default {

View File

@@ -8,12 +8,18 @@ import App from "./App";
import * as serviceWorker from "./serviceWorker";
import Modal from "react-modal";
import { db } from "./common";
import { MotionConfig, AnimationFeature } from "framer-motion";
db.init()
.catch(console.error)
.finally(() => {
Modal.setAppElement("#root");
ReactDOM.render(<App />, document.getElementById("root"));
ReactDOM.render(
<MotionConfig features={[AnimationFeature]}>
<App />
</MotionConfig>,
document.getElementById("root")
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.