Closed nimble-123 closed 6 years ago
Hi nlsltz,
thanks for your question. I’ll hope to look in to it the next days and to give you an update asap. The info that it is working in the Web IDE is a good hint. My current assumption is that the moment.js is being touched by babel or maybe an uglify task that is causing the error in the moment.js file, but that’s not more than a first guess.
Kind regards.
Hi nlsltz,
It took a while, but I can now offer you a solution to your problem. I have chosen a generic approach to add third party libraries to the project. Instead of manually downloading libraries and integrating them via manifest.json, you can now go the standard way via npm: For example, add moment.js via yarn add moment
to the dependencies of your project and the dependencies will (depend on the settings in package .json
> main.vendor
) made available to the UI5 project. You can find an exemplary sample usage in the Main.controller
.
The advantages are quite clear, that you can easily obtain third party libraries via the npm ecosystem (including auto-update etc. pp.).
Best regards, Jascha
Hi there,
i tried using your starter kit with third party libraries. Unfortunately some are working and some are not.
I placed the lib source files into a sub folder called
lib
and declared the libs in manifest.json descriptor.The JSZip lib loads as expected and i get access to the libs global name in every controller of my app but the moment.js lib throws an error like
I tried the same thing with WebIDE and the provided master/detail template and everythings works as expected. This is why i am asking here and not in the SAP forum.
Could i be missing some config i have to do due to the custom folder and file structure in your starter kit compared to the master/detail template inside the WebIDE?
Any help or hint in the right direction would be nice :)