Why does require() return “an unfinished copy” of a module exports instead of a reference to it (circular dependency)?

后端 未结 0 1334
青春惊慌失措
青春惊慌失措 2021-02-02 01:36

The usual behaviour of the require() function is to use caching. So if several modules request another one, all of them get references to the very same object repre

相关标签:
回答
  • 消灭零回复
提交回复
热议问题