From a94eafaf16236c2a58e9cc0de62534c2bcbf6216 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Fri, 8 Nov 2024 14:57:15 +0100 Subject: [PATCH] Exclude *.tsbuildinfo from shipped package `@rollup/plugin-typescript` emits a warning while building, hinting that `outputToFilesystem` defaults to true. To keep behavior and remove the warning, we just set it to `true`. Although "noEmit" is set to `true` for the tsconfig, rollup writes a .tsbuildinfo. The .tsbuildinfo is then also shipped inside the npm module and doesn't offer any benefit for library consumers. --- compiler/packages/babel-plugin-react-compiler/package.json | 3 ++- compiler/packages/babel-plugin-react-compiler/rollup.config.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/packages/babel-plugin-react-compiler/package.json b/compiler/packages/babel-plugin-react-compiler/package.json index 2e7013577c9a3..3d14518b88d70 100644 --- a/compiler/packages/babel-plugin-react-compiler/package.json +++ b/compiler/packages/babel-plugin-react-compiler/package.json @@ -5,7 +5,8 @@ "main": "dist/index.js", "license": "MIT", "files": [ - "dist" + "dist", + "!*.tsbuildinfo" ], "scripts": { "build": "rimraf dist && rollup --config --bundleConfigAsCjs", diff --git a/compiler/packages/babel-plugin-react-compiler/rollup.config.js b/compiler/packages/babel-plugin-react-compiler/rollup.config.js index b5d7567846f25..77e785c4641f2 100644 --- a/compiler/packages/babel-plugin-react-compiler/rollup.config.js +++ b/compiler/packages/babel-plugin-react-compiler/rollup.config.js @@ -28,6 +28,7 @@ const DEV_ROLLUP_CONFIG = { plugins: [ typescript({ tsconfig: './tsconfig.json', + outputToFilesystem: true, compilerOptions: { noEmit: true, },