react-dynamic-swiper
react-dynamic-swiper copied to clipboard
Tree Shaking?
Hi @nickpisacane,
When importing Swiper
as suggested like this:
import { Swiper, Slide } from 'react-dynamic-swiper'
then analyzing the vendor.js
bundle, we see a big size:
We tried to tree shake by changing the import
statement above to:
import Swiper from 'react-dynamic-swiper/lib/Swiper'
import Slide from 'react-dynamic-swiper/lib/Slide'
but that still results in the same big size and does not tree shake. It looks like on the swiper
releases on github here version 5.0.0, it mentions:
Improved es module "tree-shake-ability"
as a new feature.
Any idea how we can use react-dynamic-swiper
and get tree shaking done to only include Swiper/Slide
from swiper.js
so we can reduce our vendor.js
bundle size?