@samitouri / QOS-React-1 / commits / 23a226227f

Remove use of prettier in babel-plugin-react-forget

This kept throwing warnings in our playground build because prettier uses node APIs and is not meant to be bundled and run on the browser. There's a separate standalone version that runs on the browser. A follow on PR will make the playground use that but this PR is a first step towards using a standalone prettier.

Sathya Gunasekaran committed Oct 25, 2023 at 15:40 UTC 23a226227fd7d47c0b1ac6b82938e9eed68b553e
1 file changed +1 -2
compiler/packages/babel-plugin-react-forget/src/Utils/logger.ts
+1 -2
@@ -8,7 +8,6 @@
8 import generate from "@babel/generator";
9 import * as t from "@babel/types";
10 import chalk from "chalk";
11 -import { format } from "prettier";
11 import { HIR, HIRFunction, ReactiveFunction } from "../HIR/HIR";
12 import { printFunction, printHIR } from "../HIR/PrintHIR";
13 import { CodegenFunction, printReactiveFunction } from "../ReactiveScopes";
@@ -51,7 +50,7 @@ export function logCodegenFunction(step: string, fn: CodegenFunction): void {
50 fn.async
51 );
52 const ast = generate(node);
54 - printed = format(ast.code);
53 + printed = ast.code;
54 } catch (e) {
55 console.log("Error formatting AST: " + e.message);
56 }