Skip to content

Commit 1c32821

Browse files
chore: disable redux dev tools in code produced by yarn build (#2772)
Disable redux dev tools in code when the ELASTIC_CHARTS_DEV_MODE flag is not set Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
1 parent 51b60db commit 1c32821

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/charts/src/state/chart_state.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,11 @@ export const createChartStore = (chartId: string, title?: string, description?:
176176
// TODO https://github.com/elastic/elastic-charts/issues/2078
177177
serializableCheck: false,
178178
}),
179-
devTools: {
180-
name: `@elastic/charts - ${chartId}`,
181-
},
179+
devTools: process.env.ELASTIC_CHARTS_DEV_MODE
180+
? {
181+
name: `@elastic/charts - ${chartId}`,
182+
}
183+
: undefined,
182184
});
183185
};
184186

0 commit comments

Comments
 (0)