Adding External Library within a Javascript Action

0
Dear,  What is the best practice to add an external javascript library within my custom nano flow Action?    Thx  
asked
2 answers
1

Hi,

 

You can follow the instructions in the section 3.4 of this tutorial to install dependencies for your JS Action.

https://docs.mendix.com/howto/extensibility/create-native-javascript-action

 

Regards
Diego Antonelli
Widgets Team – Mendix

answered
0

Mendix 8.6 has a new feature to package some of your node modules in the repository, however this comes with the risk of overflowing SVN.

I have created a few pluggable widgets that wrap CryptoJs and Moment libraries. The widget does not render anything but pluggable widgets can package libraries where JS actions face trouble to say the least. So I expose the wrapped library through the widget, place the widget on the native home page and import it in my JS actions. A bit of a hack I suppose...

answered