Skip to main content
Figma12
Dec 29, 2023 1:04 PM UTC

Required to use fileReader inside code.js

I am new to Figma plugin development. I want to read the HTML file using filereader instead the code.js.

I have installed the filereader using npm. now I am facing below error while using require to import the package. As I came to know the require is not supporting in Figma.

Kindly suggest the possible way to import the filereader package.

2 replies

Gayani_S
Figmate
Community Support
Dec 29, 2023 1:29 PM UTC

Hey there, I’ve changed the category to “Share an Idea”. You can vote for your feature request.

Gleb
Power Member
Dec 29, 2023 3:28 PM UTC

You should be able to use this API in the plugin UI. Have you tried? You don’t need to install any npm packages.

MDN Web Docs