How to custom menu provider

This is how I do it:
1.Copy full file ReplaceMenuProvider.js,and in the new ReplaceMenuProvider.js, change the import of ReplaceOptions.js which to change the entries in the replace menu.
2.mkdir new Modeler: add new ReplaceMenuProvider.js as a modules.

I think the step one is too low. Do you have any other good idea?

ReplaceOptions.js
2

ReplaceMenuProvider.js
1

Modeler
CustomModule include replaceMenuProvider:['type',ReplaceMenuProvider]
3