From 4098bd58c41e0f81b2501a89ab0d2feb8c0f01d5 Mon Sep 17 00:00:00 2001 From: ikkz Date: Tue, 26 Nov 2024 11:29:00 +0000 Subject: [PATCH] fix(replace): add missing objectGuards option to RollupReplaceOptions --- packages/replace/types/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/replace/types/index.d.ts b/packages/replace/types/index.d.ts index 1f0794719..a46f7286a 100755 --- a/packages/replace/types/index.d.ts +++ b/packages/replace/types/index.d.ts @@ -23,6 +23,12 @@ export interface RollupReplaceOptions { * Files that should be excluded, if `include` is otherwise too permissive. */ exclude?: FilterPattern; + /** + * When replacing dot-separated object properties like `process.env.NODE_ENV`, + * will also replace `typeof process` object guard checks against the objects + * with the string `"object"` + */ + objectGuards?: boolean; /** * If false, skips source map generation. This will improve performance. * @default true