Browser import errors fixed; template parsing hardened
v1.4.8
2 features4 fixesThis release2 featuresNew capabilities4 fixesBug fixesAI-tallied from the release notes
Fixed
General
- Fixed browser compatibility issues where importing
@figma/code-connectin Storybook or webpack environments would fail with "Can't resolve 'child_process'" or "Console is not a constructor" errors. Node.js-only modules (child_process,console) are now imported dynamically only when needed by CLI commands, making the package safe to use in browser environments.
Template files
- Fixed template projects failing to publish or parse when Code Connect could not infer a React, HTML, Swift, or Compose parser. The CLI now proceeds without a parser and uses the default template-file globs.
- Fixed a "
getInstanceSwap(...)?.executeTemplate is not a function" error that could break a template whengetInstanceSwap('prop')referenced an instance-swap property that isn't present on the selected node (for example a property that is conditionally hidden by a boolean). The missing property now renders an inline error, consistent with the other accessors, instead of failing the whole template. - Fixed migrated text-layer references (from the React/HTML
figma.textContent('...')helper) producing a TypeScript error and silently rendering nothing when the layer was missing. Migration now preserves the original behavior — the text renders when the layer is found, and a clear error is shown when it isn't.
Features
Template files
- The
figma connect migratecommand now uses the same--dirand--filefiltering behavior aspublish,parse, andunpublish. The migrate-only positional glob argument has been removed. - The
figma connect migratecommand can now migrate compatible large source files into batch template files. Files with 10 or more Code Connect docs are attempted automatically,--batch allforces a batch attempt, and--batch nonedisables batch migration.
Fetched June 9, 2026
