Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add react-native-builder-bob to ship bundled code instead of TypeScript #482

Open
cashc opened this issue Nov 4, 2024 · 2 comments
Open
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@cashc
Copy link

cashc commented Nov 4, 2024

Hi there!

Steps to reproduce this issue in my project:

  1. Install your library maplibre-react-native
  2. In my tsconfig.json, set "noUncheckedIndexedAccess": true
  3. run npx tsc
  4. It fails with 37 errors across 9 files.
    nouncheckedindexedaccess

It appears your npm releases (10.0.0-alpha.23 is the one I'm using now) include .ts and .tsx files. This is bad practice for a few reasons, namely package size and inappropriate type-checking. See this comment from the Microsoft TS team lead about why this inappropriate type-checking is happening: microsoft/TypeScript#44205 (comment)

In order to fix this issue, I believe you'd need to create a dist folder that contains the compiled code, rather than releasing your entire codebase as an npm package.

I would like to keep my tsconfig's "noUncheckedIndexedAccess": true so I hope you can create a dist for future releases.
Thank you! We @wwoof really appreciate your work and are enjoying using this library thus far!

Cheers,
Cash

@tyrauber
Copy link
Collaborator

tyrauber commented Nov 4, 2024

Hey @cashc, Thanks for opening theis issue. @KiwiKilian and I were just discussing this the other day. We'll work to get this issue resolved before we cut 10.0.0.

@cashc
Copy link
Author

cashc commented Nov 4, 2024

Amazing! Thank you, friends 🙌🏼

@tyrauber tyrauber added this to the 10.0.0 milestone Nov 15, 2024
@KiwiKilian KiwiKilian changed the title npm release contains typescript files Add react-native-builder-bob to ship bundled code instead of TypeScript Nov 15, 2024
@KiwiKilian KiwiKilian added the enhancement New feature or request label Nov 15, 2024
@KiwiKilian KiwiKilian self-assigned this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants