Skip to content

Commit

Permalink
Support external WP dependencies in JSX files (#3209)
Browse files Browse the repository at this point in the history
  • Loading branch information
csorrentino authored Jan 20, 2025
1 parent 37e3773 commit 3f80881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/js/build/wordpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) || []),
Expand Down

0 comments on commit 3f80881

Please sign in to comment.