From d3dda4ca897762f95a4c88c86923014e6b41fd4f Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 26 Jun 2024 12:14:11 +0100 Subject: [PATCH] Storybook: Use new JSX runtime (#89768) use new jsx runtime in storybook --- packages/grafana-ui/.storybook/main.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/grafana-ui/.storybook/main.ts b/packages/grafana-ui/.storybook/main.ts index 3fb1a5d1749..dfb53620b97 100644 --- a/packages/grafana-ui/.storybook/main.ts +++ b/packages/grafana-ui/.storybook/main.ts @@ -96,10 +96,19 @@ const mainConfig: StorybookConfig = { tsconfigPath: path.resolve(__dirname, 'tsconfig.json'), shouldExtractLiteralValuesFromEnum: true, shouldRemoveUndefinedFromOptional: true, - propFilter: (prop: any) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true), + propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true), savePropValueAsString: true, }, }, + swc: () => ({ + jsc: { + transform: { + react: { + runtime: 'automatic', + }, + }, + }, + }), webpackFinal: async (config) => { // expose jquery as a global so jquery plugins don't break at runtime. config.module?.rules?.push({