201902142031_《Node.js之模块一二事(1)》

...

1. require("xxx").resolve();   //获取绝对路经

2. require是在node_modules里一级级找,找不到会跳出..;

3. export.someThing = function(){

};

等价于:

modules.exports.someThing = function(){

};

...

原文地址:https://www.cnblogs.com/beesky520/p/10380576.html