vercel / nft

Node.js dependency tracing utility
https://npmjs.com/@vercel/nft
MIT License
1.31k stars 136 forks source link

Improve wildcard tracing to include fallback #313

Open styfle opened 1 year ago

styfle commented 1 year ago

Today we can trace this correctly and include the file.json file:

path.join(process.cwd(), 'file.json')

However, we fail to include the file.json fallback in this case:

path.join(process.cwd(), filePath || 'file.json')