Hi
I have developed a simple plugin, the associated js file is never called although the associated html file is loaded.
Therefore the code I have for RED.plugins.registerPlugin seems to be never triggered:
myplugin.js:
module.exports = async function (RED) {
RED.httpAdmin.post('/test', RED.auth.needsPermission('notify.write'), async function (req, res) {
});
RED.plugins.registerPlugin('myplugin', { type: 'myplugin',
onadd: function() {
console.log('plugin added')
}
});
};
package.json
"node-red": {
"version": ">=3.1.0",
"plugins": {
"myplugin": "myplugin.js"
}
},
ADMIN EDIT: Use code blocks for code