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 [ ] ;
@@ -52,15 +58,11 @@ export async function measurePerformance(
5258 code : string ,
5359 iterations : number ,
5460) : Promise < PerformanceResults > {
55- const babelOptions = {
61+ const babelOptions : babel . TransformOptions = {
5662 filename : 'anonymous.tsx' ,
5763 configFile : false ,
5864 babelrc : false ,
59- presets : [
60- '@babel/preset-typescript' ,
61- '@babel/preset-env' ,
62- '@babel/preset-react' ,
63- ] ,
65+ presets : [ babelPresetTypescript , babelPresetEnv , babelPresetReact ] ,
6466 } ;
6567
6668 const parsed = await babel . parseAsync ( code , babelOptions ) ;
You can’t perform that action at this time.
0 commit comments