Commit 39c75dd6eec for woocommerce
commit 39c75dd6eec3b20ec42eda5ed26a28121f709c11
Author: Vlad Olaru <vlad.olaru@automattic.com>
Date: Wed Sep 2 15:43:49 2026 +0300
Restore createElement import in CustomerEffortScoreTracksContainer for the published package build (#68271)
fix(customer-effort-score): Restore createElement import in tracks container
The @woocommerce/customer-effort-score package is published through
esbuild with the classic JSX transform (jsxFactory createElement,
jsxFragment Fragment, bundle false), so every JSX source file must
import the factory itself. PR #68222 removed the createElement/Fragment
import from CustomerEffortScoreTracksContainer while the component
still renders JSX.
The in-tree admin webpack build and Jest compile from source with the
automatic JSX runtime, so tests and the shipped plugin kept working and
masked the regression. The published build-module and build artifacts,
however, emit createElement(Fragment, ...) with no binding, and any
consumer rendering the container from the npm package throws
ReferenceError: createElement is not defined.
Restore the import so the emitted artifact binds both identifiers
again, matching every other JSX file in the package.
Refs WOOAIRR-204
diff --git a/packages/js/customer-effort-score/changelog/fix-wooairr-204-ces-container-createelement-import b/packages/js/customer-effort-score/changelog/fix-wooairr-204-ces-container-createelement-import
new file mode 100644
index 00000000000..9e5ebcebbc4
--- /dev/null
+++ b/packages/js/customer-effort-score/changelog/fix-wooairr-204-ces-container-createelement-import
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Restore the createElement/Fragment import in CustomerEffortScoreTracksContainer so the published esbuild artifact no longer references unbound identifiers.
diff --git a/packages/js/customer-effort-score/src/components/customer-effort-score-tracks-container/index.js b/packages/js/customer-effort-score/src/components/customer-effort-score-tracks-container/index.js
index bf6bc22e00b..98c1cd60edb 100644
--- a/packages/js/customer-effort-score/src/components/customer-effort-score-tracks-container/index.js
+++ b/packages/js/customer-effort-score/src/components/customer-effort-score-tracks-container/index.js
@@ -4,6 +4,7 @@
import { useEffect } from 'react';
import { compose } from '@wordpress/compose';
import { withDispatch, withSelect } from '@wordpress/data';
+import { createElement, Fragment } from '@wordpress/element';
import { optionsStore } from '@woocommerce/data';
/**