H
H
heIIfire2017-07-27 01:07:41
JavaScript
heIIfire, 2017-07-27 01:07:41

What is the difference between module.id and module.filename?

Looks like they are identical! What's the catch?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lynn "Coffee Man", 2017-07-27
@Lynn

Not all modules have a filename. module id can be a dot
Use whatever makes sense

D
Dmitry Belyaev, 2017-07-27
@bingo347

https://nodejs.org/dist/latest-v8.x/docs/api/modul...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question