Corsfix integration with Figma Plugin allows you to make API requests from your Figma plugin without running into CORS errors.
- Install the Visual Studio Code extension "Live Server" if you haven't already.
- Right-click on the
index.html
file in the plugin directory, and select "Open with Live Server" from the context menu. - This will start a local server and open the
index.html
file in your default web browser, with the url http://localhost:5500/index.html.
Install the dependencies using npm:
npm install
Then, start the plugin build watch using the following command:
npm run watch
- Open Figma and go to the Actions tab.
- Click on the "Plugins & widgets" section.
- Click on "Import Plugin from Manifest".
- Select the
manifest.json
file from the plugin directory. - The plugin should now be available in the Plugins tab.
- Click on the plugin to run it.