mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 07:31:07 +01:00
Merge pull request #5137 from dschmidt/patch-2
feat: import default export if plugin is a transpiled es module
This commit is contained in:
@@ -406,6 +406,7 @@ async function loadPlugin(plugin) {
|
||||
}
|
||||
try {
|
||||
var r = require(plugin.file);
|
||||
r = r.__esModule ? r.default : r
|
||||
if (typeof r === "function") {
|
||||
|
||||
var red = registryUtil.createNodeApi(plugin);
|
||||
|
||||
Reference in New Issue
Block a user