Skip to content

Imports array is not returned any more from Figma MCP #373

@ivayloc-neoshare

Description

@ivayloc-neoshare
  • Code Connect CLI version: 1.4.1
  • Operating system - macOS Tahoe

I’m building a private Angular UI library and have created Figma Code Connect files for each component using the new parser-agnostic API. However, when I use the Figma MCP, it doesn’t return the imports declared in the imports array in figma.connect(...). In my figma.config.json file, I tried setting the language to typescript, html, and javascript, but nothing.

// url=[url to figma node]

const figma = require("figma")

const size = figma.selectedInstance.getEnum('Size', {
  S: 'FinSize.S',
  M: 'FinSize.M',
})

export default {
  id: 'fin-radio-button',
  imports: ["import { FinRadioComponent } from '@fincloud/ui/radio'"],
  example: figma.code`<fin-radio-button
        label="Label"
        options="options"
        size="${size}"
      ></fin-radio-button>`,
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions