Code sharing among multiple apps

I have a few apps that I am maintaining. There are some common code that I will be creating and would like to share across multiple apps. Those common code will have some native functionality in it. I wonder what is the best way to package them? Should I just create one capacitor library or create ionic plugins or both?