@rnx-kit/metro-serializer-esbuild 0.1.25
• Add support for `metafile` flag
• Warn when `export *` is used on log level 'debug'
You can now tell esbuild to output a metadata file. This file can be imported in https://esbuild.github.io/analyze/ to produce a neat visualization of the contents of your bundle.
#reactnative #metrobundler #esbuild
Last week, we landed a small change in #Metro to preserve comments: https://github.com/facebook/metro/releases/tag/v0.76.3
While this may seem insignificant, this means that Metro will no longer omit `__PURE__` annotations that bundlers rely on for tree shaking. As of Metro 0.76.3, you may get even smaller bundles if you're using `@rnx-kit/metro-serializer-esbuild`: https://github.com/microsoft/rnx-kit/tree/main/packages/metro-serializer-esbuild#readme
In simple examples, we've seen reductions of several hundred KBs. YMMV
#metro #reactnative #metrobundler #treeshaking