From bd28d5df6db86cc2bc2872b27fdf1eb988124a04 Mon Sep 17 00:00:00 2001 From: Spocke Date: Thu, 27 Aug 2026 11:44:27 +0200 Subject: [PATCH] TINYMCE-14841: Fixed React/Preact bundling issue --- CHANGELOG.md | 3 +++ modules/server/src/main/ts/bedrock/compiler/Rspack.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b5ade66..74e24e1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Fixed +- Tests using JSX failed with `React is not defined` when compiled with the rspack bundler. #TINYMCE-14841 + ## 17.0.0 - 2026-08-27 ### Added diff --git a/modules/server/src/main/ts/bedrock/compiler/Rspack.ts b/modules/server/src/main/ts/bedrock/compiler/Rspack.ts index 4d394ebe..3f1c27a6 100644 --- a/modules/server/src/main/ts/bedrock/compiler/Rspack.ts +++ b/modules/server/src/main/ts/bedrock/compiler/Rspack.ts @@ -63,7 +63,7 @@ const getWebPackConfigTs = (tsConfigFile: string, scratchFile: string, dest: str target: 'es2022', transform: { react: { - runtime: 'classic', + runtime: 'automatic', }, }, },