From 3f808812dd0f2e344341593ee31b8e074c8465bb Mon Sep 17 00:00:00 2001 From: csorrentino Date: Mon, 20 Jan 2025 18:02:59 -0500 Subject: [PATCH] Support external WP dependencies in JSX files (#3209) --- resources/js/build/wordpress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/build/wordpress.js b/resources/js/build/wordpress.js index bac9f05ae5..0de8dd5c14 100644 --- a/resources/js/build/wordpress.js +++ b/resources/js/build/wordpress.js @@ -86,7 +86,7 @@ export function wordpressPlugin() { } }, transform(code, id) { - if (!id.endsWith('.js')) return + if ((!id.endsWith('.js')) && !id.endsWith('.jsx')) return const imports = [ ...(code.match(/^import .+ from ['"]@wordpress\/[^'"]+['"]/gm) || []),