Keep in mind require.main's "scope" is app.js, so you'd have to do require.main.require('./src/groups.js'); if you want access to the groups lib.
require.main will always be app.js for plugins, since plugins are only called by NodeBB.
So here we are
To close a topic use topic tools:
What plugin(s) should I use in order to add custom fileds (Sex, Date of Birth etc.) to user registration form?
Thats a really good question. I need that to. Is there anything available? Couldnt get https://github.com/NicolasSiver/nodebb-plugin-ns-custom-fields to work... Would be perfect.