enketo-core icon indicating copy to clipboard operation
enketo-core copied to clipboard

Change enketo/* overridable modules

Open MartijnR opened this issue 6 years ago • 2 comments

enketo/config enketo/translator enketo/widgets enketo/dialog enketo/file-manager

To prepare for a future when we can simply load ES6 modules without any bundling (including from node_modules folder), we should change the approach for these placeholder modules.

Maybe add static setter functions like:

  • Form.config = ...., Form.dialog = ...

In app.js, we could set these properties with the placeholder files. In an application that use enketo-core, app.js would be replaced by its own entry point.

MartijnR avatar Oct 29 '18 21:10 MartijnR

Considering we need those things in many modules (e.g. in a widget), using a static property would mean we need to import Form leading to circular references.

MartijnR avatar Dec 17 '18 23:12 MartijnR

Have not been able to come up with a good approach. Will save for later and not include in 5.0.0 release

MartijnR avatar Dec 18 '18 21:12 MartijnR