Skip to content

Is babel-plugin-react-native-web still required with Next.js 12? #2217

Answered by nissy-dev
steida asked this question in Q&A
Discussion options

You must be logged in to vote

I think the babel-plugin-react-native-web is not necessary in many cases in the term of tree shaking or keeping bundle size down.

Actually, I confirmed removing all the unused code from react-native-web about the next.js example without using babel-plugin-react-native-web (only using the package aliasing). The total module size is 70.3kB, but the bundled size is only 14kB.

bundlephobia also said that react-native-web package is tree shakeable.
https://bundlephobia.com/package/react-native-web@0.18.10

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@danbim
Comment options

@nissy-dev
Comment options

Answer selected by necolas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #2165 on February 10, 2022 16:47.