Skip to content

Commit 8c266f7

Browse files
committed
fix(typescript): strict boolean normalization for recreateTransformersOnRebuild\n\nUse === true instead of Boolean(...) to avoid enabling the option for truthy strings in JS configs. Refs PR #1923 review by @shellscape.
1 parent 7b1f643 commit 8c266f7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/typescript/src/options/plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export const getPluginOptions = (options: RollupTypescriptOptions) => {
4242
typescript: typescript || defaultTs,
4343
tslib: tslib || getTsLibPath(),
4444
transformers,
45-
recreateTransformersOnRebuild: Boolean(recreateTransformersOnRebuild),
45+
// Only enable when explicitly set to true to avoid truthy string pitfalls in JS configs
46+
recreateTransformersOnRebuild: recreateTransformersOnRebuild === true,
4647
outputToFilesystem
4748
};
4849
};

0 commit comments

Comments
 (0)