Place third party JS

Hello all,

I am building a custom installation page and would like to use moment library. I have downloaded the min.js file.

What’s the recommended location to place this file?

/freshdesk-app/app/scripts/app.js
OR
/freshdesk-app/config/assets/iparams.js

1 Like

Hi @Vvikas,
if you are using the script on the custom installation page, place the file in /freshdesk-app/config/assets/*.js

and if you going to use the script in app rendering, use it in /freshdesk-app/app/*

Hope it helps :slight_smile:

Thanks

1 Like

Hi @Santhosh

Thank you for replying. It’s clear now.

Just wanted to ask - what if the script is being used in both places: custom installation page and app rendering?

you need to put in both the places

or otherwise, put this file in any CDN and use it in both places.

Thanks

From their docs:

Moment.js is available on cdnjs.com and on jsDelivr.

You can use those CDN sources in your app. Though the best way forward is not to use Moment.js.

1 Like

Thanks for the advise @kaustavdm

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.