Hi everyone! I'm developing a Figma plugin that sends selected element data to OpenRouter API and receives HTML/CSS code.
The issue: The request from the plugin never reaches the API. In the plugin console (Plugins → Development → Open Console), I see no logs from code.js at all, even though ui.html sends the message (I see a "button clicked" log).
What I've done:
-
code.tscompiles tocode.js -
manifest.jsonincludesnetworkAccess.allowedDomains: ["https://openrouter.ai"] -
API key is valid (tested separately in the browser)
-
Use developer VMis enabled
What could be wrong? Why isn't Figma loading code.js or executing the fetch call? Are there any additional settings required for external API access?
Thank you! Screenshots
