Skip to content

Commit 3f62113

Browse files
authored
fix: Add nitro.json to npm package
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 24a38b6 commit 3f62113

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • packages/create-react-native-library/templates/common

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)