Thank you for reaching out on Microsoft Q&A!
As of yet it is not possible to load any dependencies in your Logic App to support external libraries. The only possibility is to create an Azure Function holding all JS code and libraries, and call it from a Logic App.
Please leave feedback for the Logic App team to request support for this in the future:
https://feedback.azure.com/d365community/forum/cb47c115-7926-ec11-b6e6-000d3a4f032c
Please click “Accept answer” if you find this helpful. Feel free to drop additional queries in the comments below!
Kind regards,
Sonny