How plugins can communicate with each other?
Although not ideal you can require a plugin from node_modules. It might be better to put the plugin you depend on in your plugins package.json though so it is installed when your plugin is installed. Although I'm not sure if nested plugins like that are handled properly by the hook system.
Yeah all the plugins assume they are required from src/plugins.js from core so that is kind of limiting. https://github.com/NodeBB/NodeBB/blob/master/src/plugins.js#L187
@pitaj Something to note is that if the plugin has already been required, subsequent requires will still have
module.parentpointing to the first module that required it.
So... when NodeBB starts and it requires
So if you only require the module after NodeBB is done with it (e.g. defer requiring until it is actually required), you might be ok.