I have a submodule that provides some prepared configuration via config/install
. The goal is to have devs enable that module to get a preconfigured set of content types complete with preconfigured fields, form displays, view displays, language settings, pathauto patterns, etc. The reason why this is all in a module and not a profile is because it's opt-in, i.e. devs may or may not want this preconfigured stuff upon install but have the option to install it later if they want to. However...
These prepared configurations have a dependency on a custom theme because some of the entity view display configs use Layout Builder, and use layouts from that custom theme (therefore their dependencies
section will declare that custom theme as a dependency). This is intentional, the prepared configs have to use that custom theme. But those layouts also aren't specific to this submodule, they can be used outside of the prepared config and so can't be just moved over to the submodule.
If I remember correctly, modules can't install themes. So when I try to install, I get the following error.
Configuration objects provided by submodule_with_prepared_configs have unmet dependencies: core.entity_view_display.block_content.some_block.default (custom_theme)
What is the right way to introduce configuration from an enabled module that depends on a theme?