exporting a field from dev to production My custom module creates a content type which has fields. I want to export config so that other developers/production can use it.
I run

drush config-export --destination=/tmp/myconfig


from /tmp/myconfig I take the following files:

field.field.node.CONTENT_TYPE.FIELD_NAME.yml   #field instance
field.storage.node.FIELD_NAME.yml   #field storage
core.entity_form_display.node.CONTENT_TYPE.default.yml
core.entity_view_display.node.CONTENT_TYPE.default.yml


and copy these files to modules/custom/mymodule/config/optional

In the destination machine I run

drush config-import  --partial --source=modules/custom/mymodule/config/optional


The field instance gets imported (I can see it on the content type) but the storage does not, and no table is being created in the database.

Am I doing anything wrong?
Uninstalling and re-installing the module doesn't help.
At Drush Commands something similar is mentioned in the comment of Sebastian Contreras:


  --partial and --source "custom directory" are not working at all after upgrading Drupal 8.3 to Drupal 8.4 and Drush8 to Drush9.
  It does not detect the source with --source and it does not detect the --partial causing lots of removals where they should not happen.


However, did you already try the Configuration Split module? This module allows you to create different sets of configuration stored in multiple directories, and merge them back together when needed/indicated.

I'm using the Configuration Split module mostly to exclude configuration that is only needed in my development environment and not in production (modules such as Devel and Stage File Proxy). If I understand your use case correctly, this module should be able to perform the thing you want.