Skip to main content
Question

Figma Plugin export {}; added during compile causes crash

  • March 4, 2024
  • 2 replies
  • 186 views

Martyn_Bowis

I have tried to follow this guide:

figma.com

Now, the code.js file always gets the following added as the last line:
export {};

image

This then causes the plugin to crash.

I can fix the issue by commenting out or deleting that last line.

The plugin will then run again without issue.

However, the next time I make a change to the code.ts file, the hot reload runs and that line is again added to the bottom of the code.js file, causing the plugin to crash.

What is causing that line to be added?

How to resolve this error please?

Note that:

manifest.json
image

eslint.config.js
image

tsconfig.json
image

package.json
image

This topic has been closed for replies.

2 replies

Gleb
  • Power Member
  • March 4, 2024

Remove moduleResolution and module.


Martyn_Bowis
  • Author
  • Active Member
  • March 4, 2024

Thanks @Gleb !

Yes, that fixed the issue.