Skip to content

fix: point the template's react-native entry at lib - #1987

Merged
mrousavy merged 1 commit into
v1from
mrousavy/template-ship-compiled-js
Oct 23, 2026
Merged

mrousavy merged 1 commit into
v1from
mrousavy/template-ship-compiled-js

Conversation

@mrousavy

@mrousavy mrousavy commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

The template's react-native field now points at lib/index, like main and types already do. With src/index, Metro compiled a library's .nitro.ts specs with the app's Babel config, and React Native's default preset can't parse decorators:

SyntaxError: node_modules/react-native-math/src/specs/Example.nitro.ts: Support for the experimental syntax 'decorators' isn't currently enabled (5:1)

nitro-sqlite hit this in margelo/react-native-nitro-sqlite#453.

clean now also deletes tsconfig.tsbuildinfo. The composite build info sits next to tsconfig.json, so after clean removed lib/, tsc treated the project as up to date and emitted nothing. I checked this with the template's tsconfig.json and TypeScript 6.0.3.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro-docs Ready Ready Preview Oct 23, 2026 6:07pm UTC

Request Review

The template pointed `react-native` at `src/index`, so Metro compiled a
library's `.nitro.ts` specs with the app's Babel config. React Native's
default preset can't parse decorators, and bare React Native apps failed
with "Support for the experimental syntax 'decorators' isn't currently
enabled". `main` and `types` already point at `lib/`.

`clean` now also deletes `tsconfig.tsbuildinfo`. The composite build info
sits next to `tsconfig.json`, so after `clean` removed `lib/`, `tsc`
treated the project as up to date and emitted nothing.
@mrousavy
mrousavy force-pushed the mrousavy/template-ship-compiled-js branch from a19f831 to 598b61a Compare October 23, 2026 18:07
@mrousavy mrousavy changed the title fix: ship compiled JavaScript from the Nitro template fix: point the template's react-native entry at lib Oct 23, 2026
@mrousavy
mrousavy merged commit d28f2dc into v1 Oct 23, 2026
11 checks passed

This branch was successfully deployed

1 active deployment
Preview — 598b61a7 Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant