Skip to main content
Martyn_Bowis
Active Member
Mar 4, 2024 4:55 AM UTC
Question

Figma Plugin export {}; added during compile causes crash

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
Mar 4, 2024 5:24 AM UTC

Remove moduleResolution and module.

Martyn_Bowis
Active Member
Mar 4, 2024 9:55 PM UTC

Thanks @Gleb !

Yes, that fixed the issue.