From 484cc5c7a54c65a82d20258aa382296f4af0db1c Mon Sep 17 00:00:00 2001 From: zaidarain1 Date: Tue, 20 Aug 2024 13:57:44 +1000 Subject: [PATCH] fix: [DX-3140] Fix react is not defined widgets sample app error (#2100) --- packages/checkout/widgets-lib/rollup.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/checkout/widgets-lib/rollup.config.js b/packages/checkout/widgets-lib/rollup.config.js index 059f2cc2a8..23a43cf842 100644 --- a/packages/checkout/widgets-lib/rollup.config.js +++ b/packages/checkout/widgets-lib/rollup.config.js @@ -17,7 +17,9 @@ const defaultPlugins = [ preventAssignment: true, 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || PRODUCTION), }), - isProduction ? typescript({customConditions: ["default"]}) : swc.rollup(), + isProduction ? typescript({customConditions: ["default"]}) : swc.rollup({ jsc: { + transform: { react: { development: true, runtime: 'automatic' }}, + } }), ] const productionPlugins = [