Skip to main content
Question

Getting "SyntaxError: possible import expression rejected around line 1" when importing Babel

  • October 24, 2024
  • 0 replies
  • 95 views

Ienaka_Atsushi

Hi community,

I’m building a Figma plugin that parses React code and returns what components are used.

I’m using some Babel functions by importing like:

import { parse } from '@babel/parser';
import traverse from '@babel/traverse';

Although I don’t see any errors on my VS code, when I run the plugin I get an error on the console of Figma saying “SyntaxError: possible import expression rejected around line 1”.

Could anyone help me figure out the solution?

TIA

This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings