Skip to main content

Hello!
I’m trying to create plugin for Figma. I use React + ESbuilder. I have src and dist folders.

 

My index.html contains:

<div id="root"></div>
<script src="ui.js"></script>

The problem is that plugin doesn’t see (or what?) ui.js. When I start plugin I see only empty screen.

If I write JS code exactly in script tag — it works. But with external file it doesn’t work. 

There are no errors anywhere.

What should I do to solve this?

I’m also having the same problem, my external ui.js is not sync with ui.html.


I’m also having the same problem, my external ui.js is not sync with ui.html.

I found one solution — to use inline JS code.


I’m using a few assets (images) in my plugin. Everything works perfectly in Chrome when using ui.css and ui.js, but in Figma, the assets, styles, and scripts are not syncing properly.


I was under the impression that you can only have one TS/JS file and if you want to split it up you need to use something like web pack to merge them together. 


Reply