I've got a module which contains a
config/optional folder which has the content:
paragraphs.paragraphs_type.my_paragraph_id.yml field.field.paragraph.my_paragraph_id.field_my_field.yml field.storage.paragraph.field_my_field.yml core.entity_form_display.paragraph.my_paragraph_id.yml core.entity_view_display.paragraph.my_paragraph_id.yml
These files have been exported from an existing installation without uuid's. When I enable the module, the config does not import since the module
paragraphs has not yet been enabled. When I enable
paragraphs the paragraph type
my_paragraph_id is created as expected. The field storage for
field_my_field is also created, since I can create a new field based on the existing field
field_my_field. Though, the field is not created on the paragraph itself.
I've tried moving the config files to
config/install and then it simply works as expected; the field gets created on the paragraph just fine. But the module
paragraph should be optional and only then the config should be created, therefor, I want it to be optional.
Why does the
config/optional not install the field?