Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
/ rnlib Public archive

Build error repro for react-native-builder-bob PR

License

Notifications You must be signed in to change notification settings

merrywhether/rnlib

Repository files navigation

Minimal build error repro

This demonstrates the build error that arises with the explicit addition(/duplication) of @babel/plugin-proposal-class-properties in the default babel config for react-native-builder-bob. This package is a fresh invocation of yarn create react-native-library, and the only changes are updating src/index.tsx and deleting the example/ directory.

The file src/index.tsx is a minimal clone of react-native-svg's Symbol component. It includes the bare minimum repro that requires all three of these features:

  • export default class
  • class name shadowing the Symbol global
  • static class property

Removing the explicit plugin restores @babel/preset-env's natural transform ordering and allows this library to build without issue.

The easiest way to test this is to manually remove line 75 in node_modules/react-native-builder-bob/lib/utils/compile.js in your local node modules.

Created for react-native-builder-bob/pull/363.

About

Build error repro for react-native-builder-bob PR

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published