Many times on a project, you'll create a custom module and realize later in the project that you need to turn it into a feature. There's not a good process for featurizing an existing module right now. The best we've come up with is to manually add a .features.yml file to the module, export the desired config using the core config system, strip the UUIDs, and place the config into config/install. It works, but it's somewhat awkward and error-prone. It would be nice if the Features UI would let you featurize an existing module (which could be as simple as allowing you to create a new feature with the same machine name as an existing module, once #2710089: Custom files not preserved when a feature is re-exported is fixed)

Alternatively, just documenting the manual process somewhere could be helpful.

Comments

Dane Powell created an issue. See original summary.

Dane Powell’s picture

Issue summary: View changes
mpotter’s picture

Actually, all you need to do is add the "modulename.features.yml" file with the contents of "true" and then you will see the module listed in the Features page and can edit it and add config via the UI. No need to manually export config, strip uuid, etc as far as I know.

Now that I think more about it, the fact that we hide "empty" features might also make this more difficult than it should be.

I'm still a bit worried about allowing people to use an existing module name, since there is another issue about adding a restriction for that so as not to cause conflicts with existing modules. So might need some advanced option to allow using an existing name.

nedjo’s picture

nedjo’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.