From 86e2de4bd4f710d3b08bdab034d7eb9d5da2d5ee Mon Sep 17 00:00:00 2001 From: Sathya Gunsasekaran Date: Mon, 24 Jun 2024 16:13:06 +0100 Subject: [PATCH 1/2] [compiler] Enable sourceMaps in tsconfig --- compiler/packages/babel-plugin-react-compiler/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/packages/babel-plugin-react-compiler/tsconfig.json b/compiler/packages/babel-plugin-react-compiler/tsconfig.json index 568b1f44ea632..082e03476c647 100644 --- a/compiler/packages/babel-plugin-react-compiler/tsconfig.json +++ b/compiler/packages/babel-plugin-react-compiler/tsconfig.json @@ -17,7 +17,8 @@ // ideally turn off only during dev, or on a per-file basis "noUnusedLocals": false, "composite": true, - "removeComments": true + "removeComments": true, + "sourceMap": true, }, "exclude": [ "node_modules", From cbe43c39ddd0a2c3a985ea7ca1801926631692fd Mon Sep 17 00:00:00 2001 From: Sathya Gunsasekaran Date: Tue, 25 Jun 2024 12:16:52 +0100 Subject: [PATCH 2/2] Use virtual tsconfig in snap --- compiler/packages/babel-plugin-react-compiler/tsconfig.json | 3 +-- compiler/packages/snap/src/runner-watch.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/packages/babel-plugin-react-compiler/tsconfig.json b/compiler/packages/babel-plugin-react-compiler/tsconfig.json index 082e03476c647..568b1f44ea632 100644 --- a/compiler/packages/babel-plugin-react-compiler/tsconfig.json +++ b/compiler/packages/babel-plugin-react-compiler/tsconfig.json @@ -17,8 +17,7 @@ // ideally turn off only during dev, or on a per-file basis "noUnusedLocals": false, "composite": true, - "removeComments": true, - "sourceMap": true, + "removeComments": true }, "exclude": [ "node_modules", diff --git a/compiler/packages/snap/src/runner-watch.ts b/compiler/packages/snap/src/runner-watch.ts index 414d99084c52e..d6c7ae0601c53 100644 --- a/compiler/packages/snap/src/runner-watch.ts +++ b/compiler/packages/snap/src/runner-watch.ts @@ -27,7 +27,7 @@ export function watchSrc( const host = ts.createWatchCompilerHost( configPath, ts.convertCompilerOptionsFromJson( - { module: "commonjs", outDir: "dist" }, + { module: "commonjs", outDir: "dist", sourceMap: true }, "." ).options, ts.sys,