airbnb / react-sketchapp

render React components to Sketch ⚛️💎
http://airbnb.io/react-sketchapp/
MIT License
14.95k stars 824 forks source link

Live Reload is slow #479

Closed oluckyman closed 4 years ago

oluckyman commented 4 years ago
Reporting a bug or issue

I run the commands from Quick-start:

git clone https://github.com/airbnb/react-sketchapp.git
cd react-sketchapp/examples/basic-setup && npm install

npm run render

Opened react-sketchapp/examples/basic-setup/src/my-command.js and changed Swatch component. A minor change: {name}{name} hi.

Expected behavior: When I save the file in the editor, the change appears in the sketch instantly or within reasonable time (less than 10 seconds)

Observed behavior: I was thinking Live Reload did not work at all, but while I googled how to enable Live Reload it finally updated, after 63 seconds:

🔧  Built ./my-command.js in 63200ms

How to reproduce: See above

Sketch version: Version 63.1 (92452)

60 seconds for live reload. Is it normal?

brenordr commented 4 years ago

@oluckyman It's a bug in skpm. Duplicate of https://github.com/skpm/skpm/issues/266

macintoshhelper commented 4 years ago

What I've done as a temporary fix, is downgrade @skpm/builder to ^0.4.3, and am leaving my Sketch version on 57.1 to make sure it's compatible with @skpm/builder.

oluckyman commented 4 years ago

My workaround is to build it without --run option: npm run watch, so it watches and rebuilds quickly. And then I run the plugin in Sketch manually with ^⇧R shortcut 🤦‍♂️

mathieudutour commented 4 years ago

closing in favour of https://github.com/skpm/skpm/issues/266