Closed YuanboXue-Amber closed 6 months ago
When using @griffel/postcss-syntax parse on TS code:
parse
parse(`import type { Something } from 'somwhere'`, { babelOptions: { presets: ["@babel/preset-typescript"], }, });
It throws error 💥 Unexpected token, expected "from".
Unexpected token, expected "from"
This happens because presets config is not used when transforming code with Babel.
presets
This PR takes the babelOptions presets/plugins and use it during transform.
babelOptions
🤖 This report was generated against b1ab99887757fd6cf2eb66abf203c3eef93abd9d
When using @griffel/postcss-syntax
parse
on TS code:It throws error 💥
Unexpected token, expected "from"
.This happens because
presets
config is not used when transforming code with Babel.This PR takes the
babelOptions
presets/plugins and use it during transform.