Discuss anything related to Knip
Expo (v52) uses an entry that's inside node_modules
default package.json
{
"main": "expo-router/entry",
}
when changing that to a custom entry file
modified package.json
./index.js
import './node_modules/expo-router/entry';
// register events like
// https://github.com/transistorsoft/react-native-background-geolocation/issues/1582#issuecomment-1307681914
Knip starts reporting that basically everything in the project directory is not used (app/ ,hooks/ ...etc).
configuring entry to index.js doesn't seem to help
knip.json
{
"entry": ["index.js"],
"ignore": [
"app.json"
],
"ignoreDependencies": [
"react-native-background-fetch",
"@react-navigation/native-stack"
]
}
Any idea how to handle this?
Discuss anything related to Knip
Expo (v52) uses an entry that's inside
node_modules{ "main": "expo-router/entry", }when changing that to a custom entry file
{ "main": "index.js", }Knip starts reporting that basically everything in the project directory is not used (
app/,hooks/...etc).configuring
entrytoindex.jsdoesn't seem to help{ "entry": ["index.js"], "ignore": [ "app.json" ], "ignoreDependencies": [ "react-native-background-fetch", "@react-navigation/native-stack" ] }Any idea how to handle this?