gluestack / gluestack-ui

React & React Native Components & Patterns (copy-paste components & patterns crafted with Tailwind CSS (NativeWind))
https://gluestack.io/
MIT License
2.33k stars 110 forks source link

Hot reloading no longer works after adding Babel plugin #1537

Open Gluant101 opened 8 months ago

Gluant101 commented 8 months ago

Description

joelso — Yesterday at 01:54 Hey everyone, I'm currently trying to understand the Babel plugin as detailed here: https://gluestack.io/ui/docs/production-optimizations/babel-plugin.

Do I have it right that I should add the plugin to my React Native app that is using Gluestack UI to get all performance benefits? I assume yes, but there is this wording in the docs that confuses me a bit (plus I noticed that in the boilerplate project no such babel config is there):

Note: We already provide you with the plugin config for @gluestack-ui/themed. So you have to do minimal configuration to get it working.

Also, after adding it, I've noticed that hot reloading no longer works. Has anyone else encountered this issue, or does anyone have any insights on how to address it? Or is it so that I should not need it/use it while in dev mode only for prod builds?

CodeSandbox/Snack link

No response

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

gluestack-ui Version

3.3.1

Platform

Other Platform

No response

Additional Information

No response

ankit-tailor commented 7 months ago

Hey @Gluant101, Thanks for reporting the issue. We'll look into it.

vyobukhov commented 5 months ago

@ankit-tailor any updates on this issue?

P.S. Hot Reload is broken only for gluestack components. Also using // @refresh reset on the file with gs components also works but it's obviously not a solution

vyobukhov commented 5 months ago

Also it looks like that the issue is related only to gluestack props manipulation. Hot reloading for regular props and adding / removing components works fine.

But when I try to change color or set gs-props like px nothing is updated. So something is wrong in visitor.JSXOpeningElement

vyobukhov commented 3 months ago

@Viraj-10 @ankit-tailor

any updates on this issue? It's really hard to develop without hot reload since you spent too much time reloading scenes manually. Not sure how other devs live without it or they just ignore babel optimisations completely