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

require.main.filename not shimmed... #83

Closed
username-II opened this issue Nov 30, 2018 · 5 comments
Closed

require.main.filename not shimmed... #83

username-II opened this issue Nov 30, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@username-II
Copy link

require.main.filename not shimmed...

@timneutkens
Copy link
Member

Could you provide more context?

@timneutkens
Copy link
Member

Ok so it looks like something Node.js provides by default:

https://nodejs.org/api/modules.html#modules_accessing_the_main_module

@username-II
Copy link
Author

Sorry, yes as shown in: https://nodejs.org/api/modules.html#modules_require_main
as described here: https://www.stefanjudis.com/today-i-learned/node-js-entry-script-with-process-mainmodule-or-require-main/
require.main.filename is handy for finding the main entry script filename, path and associated info.

@rauchg
Copy link
Member

rauchg commented Dec 1, 2018

It's very similar to #21

@rauchg rauchg added the bug Something isn't working label Dec 1, 2018
@rauchg
Copy link
Member

rauchg commented Dec 1, 2018

ncc@0.2.0

@rauchg rauchg closed this as completed Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants