Share CDNS between custom components

I'm looking to share a CDN link across all my custom components. This way, when the link needs to be updated, I can do it in one place instead of multiple locations. Is there a method or workaround to achieve this?

example:
"https://unpkg.com/antd@5.4.0/dist/antd.min.js"

any ideas?

Hello @Esraa_Al_Husamia!

If you have a value such as a link/string that you want to share around you app, I would recommend creating a Javascript variable.

This way you have a single source of truth and it will automatically update in all locations it is being used. You can also use string concatenations to make this dynamic if you need.

The Variable option is the bottom one, let me know if this works for you!

1 Like