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

🧩 expo app with custom entry file #918

Open
mwmcode opened this issue Jan 20, 2025 · 0 comments
Open

🧩 expo app with custom entry file #918

mwmcode opened this issue Jan 20, 2025 · 0 comments
Labels
discussion Discussion

Comments

@mwmcode
Copy link

mwmcode commented Jan 20, 2025

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

{
    "main": "index.js",
}

./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?

@mwmcode mwmcode added the discussion Discussion label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion
Projects
None yet
Development

No branches or pull requests

1 participant