From cb0f7e5657a725e0d6f556e702bb6e9d8b1a7744 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 21 Sep 2022 10:59:06 -0400 Subject: [PATCH] add config to esbuild to ensure react runtime for addons is always as expected by the manager --- code/lib/builder-manager/src/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/lib/builder-manager/src/index.ts b/code/lib/builder-manager/src/index.ts index 753c2dd3acf..2971355170c 100644 --- a/code/lib/builder-manager/src/index.ts +++ b/code/lib/builder-manager/src/index.ts @@ -57,6 +57,18 @@ export const getConfig: ManagerBuilder['getConfig'] = async (options) => { minify: false, sourcemap: true, + jsxFactory: 'React.createElement', + jsxFragment: 'React.Fragment', + jsx: 'transform', + jsxImportSource: 'react', + + tsconfigRaw: JSON.stringify({ + compilerOptions: { + jsx: 'react', + jsxImportSource: 'react', + }, + }), + legalComments: 'external', plugins: [ aliasPlugin({