External Javascript file for my plugin

I am trying to create a plugin with UI
the problem is ui.html file don’t want to load my ui.js tag

thanks for help

Embed your JavaScript code in HTML.

and what about accessing external libraries? same problem

How did you include the external library?
<script src="https://hostname.com/library.js"></script>? There shouldn’t be any problems with this.

1 Like

like that
<script src="ui.js"></script>

You have to embed js code in HTML:

    //your code

So i cannot put my UI code in seprate js file?

It don’t even want to load js files like that:
<script src="https://hostname.com/library.js"></script>

Yes, Figma doesn’t allow you to have separate js, css and other files. Read more at Figma Developers:

Sorry, but I can’t confirm this. For example, if I include the jQuery library, then I can access it in code.

<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
    // Display the version number of the external library.

thank you :slightly_smiling_face: