Skip to main content
Amr_Esam
September 3, 2022
Solved

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

This topic has been closed for replies.
Gleb
GlebSolution
Power Member
January 10, 2024

this is the answer

15 replies

Gleb
Power Member
March 19, 2023

Figma doesn’t load your whole computer onto their servers when you publish a plugin, it only loads the files that are listed in the manifest: code.js and ui.html. It doesn’t care/know about any other files that exist in your file system and how they can be related to your code.

If you need to use external libraries, you either need to bundle them into one file (using Webpack, ESbuild etc.) or use a CDN.

March 19, 2023

What is the way to use external library in ut.html via Webpack? If Webpack will create bundle in dist/code.js I can’t use it as . How can I use some node_modules that I want to access in ui.html with using of Webpack?

January 10, 2024

@Gleb any ideas on what @Yaroslav20 is asking here? I have the same request. Thanks!

Gleb
GlebSolution
Power Member
January 10, 2024

this is the answer

January 12, 2024

Indeed this (Webpack: see example) works great! Thanks!