I have a Magento 2.2.2 website with different storeviews. I have made som custom modules. Is that possible to have my custom modules only work for a specific storeview?
IMO, the simplest way could be you can create an admin configuration via xml file (yes/no) in store view scope to enable module, then before doing any logic you can check that.
If the extension develope to work at store level, then you can easily do that things like this.
Open admin and go to configuration of extension.
Check is there any field to make extension enable/disable ?
If the field is available, then choose the storeview from dropdown for which you want disable the extension.
Now disable extension and save configuration.
make caching and indexing and then check.