Compile DIST widgets

50
2
yesterday
Labels (2)
Esprit3
New Contributor III

I am developing templates and would like to change ExB's base widgets in dist. However, changing the src code does not update, as ExB is taking it from the compiled code in dist. How can I compile the widget?

I am talking about the base widgets, not the widgets in "your-extensions" but at the same level "dist" folder. 

0 Kudos
2 Replies
AndreLoerch
New Contributor
I don't know why one would want to change the base widgets directly. Presumably you could, and the reasons you might not be seeing the updates you're making could be a need to restart the ExB server instance / service or maybe a need to update the translation too, assuming you are only making text changes.

What I do when I want a custom version of a base widget, is I copy the base widget to the client - your-extensions - widgets folder, and then customize it. That way it appears as a new custom widget, but is really the base widget with customizations.
0 Kudos
Esprit3
New Contributor III

I can't use custom widgets because I am developing custom templates, which specify directly the widgets in dist, which are not "custom". 

E.g. I have a foldable sidebar with a table inside, I want to modify it so that the table sends a trigger to the sidebar to open when it has new data. 

So my only option, is to copy the base widget to your-extensions, run npm run build:prod, copy the dist of the base-modified widget, put it in dist where I want, AND add it to the configs so it doesn't get deleted (for some reason webpack deletes custom widgets in dist if they are not in configs)..?

0 Kudos