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

Support for tracing files for Edge runtime #442

Open
ckohen opened this issue Sep 15, 2024 · 0 comments
Open

Support for tracing files for Edge runtime #442

ckohen opened this issue Sep 15, 2024 · 0 comments

Comments

@ckohen
Copy link

ckohen commented Sep 15, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant