How to export custom user fields configuration? I'm developing a module and it needs some custom fields on the users table.

If I export the whole config yml zip, the field.field.xxx and field.storage.xxx files for my custom fields are there, but since "users" isn't a custom content type of my module, those fields are not added to the users table during module installation.

How do I add those fields to the users table during module installation?
Modules can add in the config/optional directory any configuration file for fields or  entities. For example, the Forum module uses the config/optional directory to define a new content type and its fields, but it could have as well defined fields for a content type defined from another module. Keep in mind that in this case, the module need to define an explicit dependency from the other in the configuration file for the field. 

For an example of using the config/install directory for defining new bundles and its fields, see the config/install directory used from the Standard profile.