mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #3669 from dschmidt/patch-1
Import default export if node is a transpiled es module
This commit is contained in:
commit
dd0d1e700e
@ -359,6 +359,7 @@ function loadNodeSet(node) {
|
|||||||
try {
|
try {
|
||||||
var loadPromise = null;
|
var loadPromise = null;
|
||||||
var r = require(node.file);
|
var r = require(node.file);
|
||||||
|
r = r.__esModule ? r.default : r
|
||||||
if (typeof r === "function") {
|
if (typeof r === "function") {
|
||||||
|
|
||||||
var red = registryUtil.createNodeApi(node);
|
var red = registryUtil.createNodeApi(node);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user