Update codes in a plug-in file

Hi everyone,

I followed the exact steps in this Figma tutorial to create a plugin on my own. I made changes to the “code.ts” file, but my plugin didn’t update the effects.

The details: I made changes to the “code.ts” file by replacing “figma.createRectangle()” with “figma.createEllipse()”. I relaunched the plugin on Figma, but the plugin still created rectangles rather than ellipses.

If I made the same change to the “code.js” file, I was able to update the plugin effects.

I have tried the following:

  • Restart my desktop, relaunch vs code, relaunch Figma
  • Ensure that I Install everything as required: vs code, node.js, npm, TypeScript, typings, (and verify all installation)
  • Select “Select Command Prompt” under “terminal select default profile”
  • Select “tsc:watch-tsconfig.json.”

Just reporting that I’m having the same issue. I’m updating a plugin and the watch command isn’t doing the automatic updating of the .js file. I usually have to force a change to the config file or some other brute force hackery (e.g. force a tsc error loop on code.ts) to get the .js file to update.

This is more likely an issue with VS Code rather than Figma, but I’m checking here if anyone has seen a similar issue and figured out how to resolve it.