mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Enable functionExternalModules by default
This commit is contained in:
parent
eb4625a0b9
commit
2cc1973f62
@ -329,7 +329,7 @@
|
||||
|
||||
function getLibsList() {
|
||||
var _libs = [];
|
||||
if (RED.settings.functionExternalModules === true) {
|
||||
if (RED.settings.functionExternalModules !== false) {
|
||||
var libs = $("#node-input-libs-container").editableList("items");
|
||||
libs.each(function(i) {
|
||||
var item = $(this);
|
||||
|
@ -100,7 +100,7 @@ module.exports = function(RED) {
|
||||
node.fin = n.finalize ? n.finalize.trim() : "";
|
||||
node.libs = n.libs || [];
|
||||
|
||||
if (RED.settings.functionExternalModules !== true && node.libs.length > 0) {
|
||||
if (RED.settings.functionExternalModules === false && node.libs.length > 0) {
|
||||
throw new Error(RED._("function.error.externalModuleNotAllowed"));
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@ module.exports = function(RED) {
|
||||
RED.nodes.registerType("function",FunctionNode, {
|
||||
dynamicModuleList: "libs",
|
||||
settings: {
|
||||
functionExternalModules: { value: false, exportable: true }
|
||||
functionExternalModules: { value: true, exportable: true }
|
||||
}
|
||||
});
|
||||
RED.library.register("functions");
|
||||
|
2
packages/node_modules/node-red/settings.js
vendored
2
packages/node_modules/node-red/settings.js
vendored
@ -396,7 +396,7 @@ module.exports = {
|
||||
//fileWorkingDirectory: "",
|
||||
|
||||
/** Allow the Function node to load additional npm modules directly */
|
||||
functionExternalModules: false,
|
||||
functionExternalModules: true,
|
||||
|
||||
/** The following property can be used to set predefined values in Global Context.
|
||||
* This allows extra node modules to be made available with in Function node.
|
||||
|
Loading…
x
Reference in New Issue
Block a user