Skip to content

Commit 46c0b13

Browse files
authored
fix: Add nitro.json to npm package (#860)
In a future version of Nitro, you will be able to import types (HybridObjects) from other libraries. For the import to work seamlessly, nitrogen needs to read the other library's `nitro.json` so it knows which C++/Android/Swift namespace to import to resolve the foreign type. That's why the `nitro.json` file should be part of the npm package! :)
1 parent 5d0e5cf commit 46c0b13

File tree

1 file changed

+1
-0
lines changed
  • packages/create-react-native-library/templates/common

1 file changed

+1
-0
lines changed

packages/create-react-native-library/templates/common/$package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"cpp",
2121
<% if (project.moduleConfig === "nitro-modules") { -%>
2222
"nitrogen",
23+
"nitro.json",
2324
<% } -%>
2425
"*.podspec",
2526
"react-native.config.js",

0 commit comments

Comments
 (0)