学习并开发一款Figma插件,经过多次尝试,选择结合着svelte和原生进行开发
右键→Widgets→Development→New widget…npm install -g typescriptnpm install --save-dev @figma/plugin-typingscmd+shift+b,执行tsc:watch - tsconfig.jsoncode.ts 中编辑 js 内容,在 ui.html 中编辑页面内容,编译后的内容在public 文件夹内在 ui.html 中添加 <link rel="stylesheet" href="<https://cdn.jsdelivr.net/gh/thomas-lowry/figma-plugin-ds/dist/figma-plugin-ds.css>">
在 manifest.json 中添加/修改
"networkAccess": {
    "allowedDomains": [
      "<https://cdn.jsdelivr.net>",
      "<https://rsms.me>"
    ]
  }
官方教程和对应的官方推荐样式库:https://www.youtube.com/watch?v=p-z566ILvxc&list=PLXDU_eVOJTx5YBAszyuOTyxlgIxkQVyii&index=5
官方API地址:https://www.figma.com/plugin-docs/how-plugins-run/
Figma官方的资源:https://github.com/figma/plugin-resources
css原地址:https://github.com/thomas-lowry/figma-plugin-ds/blob/master/dist/figma-plugin-ds.css
svg转css url在线工具:https://csspro.com/svg-to-background-image-css/
最后更新时间:August 4, 2025
【无法引入函数】
问题原因: