Skip to main content
Question

Hot reload not working with React


Lucas_Miqueias

I’ve been trying to use Hot Reload for a while now but it doesn’t update.
I always need to reload the plugin.

Is there anything I can do?

ezgif-2-b0e7e698b3

This topic has been closed for replies.

16 replies

ali_yousefi

I have the same issue…


Same issue here. Not sure what needs to be done. The hot reload plugin option doesn’t get checked as per the documentation


I have same issue.


Colin_Wirz
  • New Member
  • 4 replies
  • July 26, 2023

I have the same issue. Figma is only watching if the manifest.json file changed. So if you want to hotreload the plugin just change the manifest file or make sure the file gets updated somehow every time your build tiggers so the changed date and time of the file is new and Figma will reload the plugin.


Lucas_Miqueias

This makes sense and sad at the same time. 🥲


Colin_Wirz
  • New Member
  • 4 replies
  • July 27, 2023

It gets checked but only when you access the menu via rightclick somewhere and then you can select hotreload.


Lucas_Miqueias

Ok, but this isn’t productive.

Is there any alternative?


Pop_Razvan1

Does anyone have a solution for this ?


I faced the same issue but it was from Webpack, not React.
Adding cache: false to HtmlWebpackPlugin fixed the issue of my dev environment.


Lucas_Miqueias

This not working for me.
My files ui.js and main.js are updating, but the Figma not listening.


Andres_Vaquero

If you are working with stylesheets, you might find my new package useful

GitHub

atrutt
  • New Member
  • 4 replies
  • March 13, 2024

I was having the same issue. It seems like launching the plugin from Resources > Plugin works better than from the right panel relaunch button.


Yash_Poojary

Did you find a solution for this?


Gavin
  • Active Member
  • 31 replies
  • October 31, 2024

Hi, I don’t mean to highjack this thread but I’m the author of a library that makes developing Figma plugins easier. One of the main features is it uses a local development server instead of re-building the file with each file change. I think this will solve your issue as it doesn’t rely on Figma to reload the plugin. One caveat is that when you publish your plugin, you must create a build before doing so. But it’s a small price to pay for a better developer experience.

You can check it out at plugma.dev.

Let me know if you have any feedback.


Lyon_Yu
  • 1 reply
  • November 1, 2024

Cool shit! This really solved my urgent problem. I spent most of the day just implementing “building Figma plugins with vitejs” and then encountered the hot reload issue. Just when I was about to give up, I saw your post. Plugma really perfectly solved my problem.


Gavin
  • Active Member
  • 31 replies
  • November 1, 2024

This is great to hear. I’m so glad it helped you.


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