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.

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

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