npm packages

Instead of building relational database in Mendix, is it possible to utilize our own APIs (in the form of npm packages) to get the data representation through Javascript function calls? In 2.2.6 of this document:, it says "Loading and bundling external libraries are not currently supported. Embedding library code and CSS inside the JavaScript is not ideal. Adding the library JavaScript file and CSS into the theme folder and referencing them in the index.html and the components.json is recommended.” So it seems that currently we can’t have a package.json to add and install external npm packages, but rather we have to include js libraries using script tag.
1 answers

Hi Kualin,

In the upcoming 8.4 release we added a solution for this problem

- For JavaScript actions, you can now commit the node_modules folder in your app project. This way, you can use and distribute node modules in JavaScript actions. However, you should only commit the files used, as the amount of files that can be handled by SVN is limited.


Cheers, Andries