-
Notifications
You must be signed in to change notification settings - Fork 151
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
Trace entry files without extension #249
Comments
We might need to peek in the file contents to check if the first line contains a hash bang. @guybedford Could we remove this |
The reason for this is that Node.js in ESM mode doesn't execute files without an extension, although it does in CJS mode. We could perhaps add an exception for the initial entry point specifically ( |
I think this guard can be removed for input files and we can fail gracefully during parse failures: #294 |
Currently files passed to
nodeFileTrace
without extension are not traced beacuse of this linenft/src/node-file-trace.ts
Line 40 in f146d3c
However it is common for files that end up in .bin directory to not have an extension (and also to have
#!/usr/bin/env node
on top, which already works), these files are still js code but they don't have the 'js' extensionThe following will not trace the files dependencies because
next/dist/bin/next
does not have an extensionThe text was updated successfully, but these errors were encountered: