require和remote.require有什么区别,如下所示
var path = require('path');
const remote =require('remote');
var fsPlus =remote.require('fs-plus');
答案 0 :(得分:1)
我找到了need和remote.require的东西,也许是正确的:
require
用于获取Npm包
并且remote.require
将访问依赖项部分的packages.json文件中的远程定义的包。
例如
{
"name": "Test",
"description": "TestA modern parcel terminal",
"version": "0.1.47",
"main": "main.js",
"dependencies": {
"edge-atom-shell": "^5.0.1",
"finalhandler": "^0.5.0",
"nconf": "^0.8.4",
"fs-plus": "^2.9.2",
"fs-extra": "^0.30.0",
"py-logging": "^0.8.1",
"serve-static": "^1.11.1",
"server-destroy": "^1.0.1"
}
}