We are running aem with author runmodes [dev, author].
Now when we deploy these folders only configs from config.author.dev activate the osgi component. Even if we manually change configs in /apps/*/config folder it does not activate my component with new config.
However, if we change configs under config.author.dev it does reactivate my component with the configs under the config.author.dev folder.
Documentation says config is applicable to all run modes. So just wondering if this behavior is correct.
Further, do we need have all the folders as sling:folder rather than nt:folder. What is the purpose of declaring a folder as sling:folder ?
The behavior you've described is expected, since if there are several config folders with multiple run modes combined, the most specific one is applied. In your case config.author.dev has a priority over just config or config.author. More details about config resolution order can be found here (please see the "Resolution of multiple Run Modes" section).
The documentation suggests using sling:folder for managing OSGI configs. Differences between sling:folder and nt:folder (please see the link for reference):
nt:folder - This node type represents a plain file system folder (it can have nt:folder and nt:file children and only a few restricted meta data properties) // so quite restricted in terms of properties and nodes.
sling:folder - This node type is basically nt:folder + nt:unstructured in one, i.e. it can be used inside other nt:folders. // should be used more often.