File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
compiler/packages/react-mcp-server/src/tools Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 11import * as babel from '@babel/core' ;
22import puppeteer from 'puppeteer' ;
3+ // @ts -ignore
4+ import * as babelPresetTypescript from '@babel/preset-typescript' ;
5+ // @ts -ignore
6+ import * as babelPresetEnv from '@babel/preset-env' ;
7+ // @ts -ignore
8+ import * as babelPresetReact from '@babel/preset-react' ;
39
410type PerformanceResults = {
511 renderTime : number ;
@@ -25,15 +31,11 @@ export async function measurePerformance(
2531 code : string ,
2632 iterations : number ,
2733) : Promise < PerformanceResults > {
28- const babelOptions = {
34+ const babelOptions : babel . TransformOptions = {
2935 filename : 'anonymous.tsx' ,
3036 configFile : false ,
3137 babelrc : false ,
32- presets : [
33- '@babel/preset-typescript' ,
34- '@babel/preset-env' ,
35- '@babel/preset-react' ,
36- ] ,
38+ presets : [ babelPresetTypescript , babelPresetEnv , babelPresetReact ] ,
3739 } ;
3840
3941 const parsed = await babel . parseAsync ( code , babelOptions ) ;
You can’t perform that action at this time.
0 commit comments