react-id-swiper
react-id-swiper copied to clipboard
Tree shaking?
Hey there!
Right now, when building chunks, the swiper library is fully built, which results in a huge chunk.
Is there anything we can do in the webpack configuration to tree shake this?
Thanks!
This works for me https://react-id-swiper.ashernguyen.site/doc/custom-build
The provides configuration (regex) doesn't work (it's not valid)
module: {
rules: [
{
exclude: [/node_modules/(?!(swiper|dom7)/).*/, /.test.js(x)?$/],
test: /.js(x)?$/,
use: [{ loader: 'babel-loader' }],
}
],
}
What exactly is the goal here? To exclude from the babel transpilation swiper
and dom7
files?