Build a Figma plugin using Vite and Preact

preview_player
Показать описание
Learn how to build a sample Figma plugin using Vite Preact template.

0:00 Intro
0:35 How Figma plugins work
1:23 Sample Figma plugin
2:48 Sample plugin code overview
4:29 Why Vite?
5:08 Vite Preact template setup
5:50 Migrating sample code
10:08 Installing TS typings
10:42 ESbuild for bundling plugin code
11:22 Adding build script for ESbuild
12:04 Running the build
12:25 Manifest file
13:21 Running the plugin in Figma
14:33 Singlefile Vite plugin
15:50 Figma plugin demo
16:20 Changing plugin window size
17:05 Outro

Рекомендации по теме
Комментарии
Автор

I love this kind of videos they are unique. Great job!

codeVictor
Автор

Excellent tutorial! This method can be used for React/Vue/Svelt too. My main issue was figuring out how to turn the code.ts file into the .js file when using Vite - as in the best method. I think there's a way to use Vite config to output the code.js to .ts but that seems to be overkill? I don't know yet.

VeeDCreate
Автор

Great vid! Thanks. But surely, onChange, or handleChange, not handleOnChange.

DaveStewartLondon
Автор

Hey, how do I fix the errors and get typescript suggestions on lib/code.ts ?

habiburnabiarafat