Skip to main content
Question

Figma Plugin export {}; added during compile causes crash


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
  • 4710 replies
  • March 4, 2024

Remove moduleResolution and module.


Martyn_Bowis
  • Author
  • Active Member
  • 29 replies
  • March 4, 2024

Thanks @Gleb !

Yes, that fixed the issue.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings