Support for tracing files for Edge runtime
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Description
I know this package is called node file trace, but I believe it's utility extends far beyond just node. I would venture to say that the name indicates that it's a file tracer that was built to run in node.
I have a vercel project (monorepo update splitter) that builds it's own custom output. The middleware in this project obviously runs on the edge (and I've attempted to run some of the other functions on the edge in the past).
Edge functions do (now) support importing from node_modules files included in their func folder, and thus no longer need to be bundled. This is nearly possible with just conditions, however a lot of packages don't have export conditions, and instead use the web / browser string variants as it has been supported for much longer. I have built a simple patch for the runner api of this package that allows me to specify whether an entrypoint is expected to run in a web-based runtime, and it then adjusts what field of package.json it looks for a "main" entrypoint from. This has proved quite useful, and I think this package could benefit from having it natively.
Is this something that would be acceptable to add?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the runner API and the package.json entrypoint resolution described in the issue, focusing on how web or browser fields are selected instead of main. Compare the proposed runtime option with the existing conditions behavior. Done means Edge-targeted tracing can select the appropriate entrypoint and include the required files without breaking Node tracing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100