figma-plugin
figma-plugin copied to clipboard
Ability to run the plugin in the browser
When we locally build with the plugin we need to re-build the plugin to get the newest state. This means the plugin relaunches in Figma, and we see the newest state. That is far from a perfect workflow when we think of hot reloading that we'd get in the browser. We need to find a way where we can work on making changes to the plugin without having that much overhead that costs us that much time.
Solution(s)
- Find a way where we can run the plugin in the browser. This used to work in the past, and has stopped working with this commit. In the past we used to deploy PRs of plugins to Vercel, where we could test them. Combined with the ability to put the plugin into a certain "debug state" we could test that the plugin works without even running Figma. Our Cypress E2E tests run in the browser too, it seems like there might be something off with our webpack config our the startup preventing this
- As an alternative, perhaps there's ways where we can not relaunch the plugin in Figma to get the latest changes? If we were to get hot reload working there, we'd save a lot of time as well!
the PR that broke the Vercel previews and local dev: https://github.com/tokens-studio/figma-plugin/pull/1087 The PR right before this one: https://github.com/tokens-studio/figma-plugin/pull/1086 still had a working deployment: https://figma-tokens-9kfbmk152-six7.vercel.app/
Definition of done
- [ ] We are able to run the plugin in the browser again using
yarn serve
or something similar - [ ] We are able to have a hot-reload experience that leads to a more satisfying DX