Skip to content

Commit 5c93c50

Browse files
Update utils/custom-loaders/html-tag-jsx-loader.js
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent b1f43cc commit 5c93c50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/custom-loaders/html-tag-jsx-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function htmlTagJsxLoader(source) {
2222

2323
// Quick check: if no JSX syntax at all, pass through unchanged
2424
// Look for JSX opening tags: < followed by a letter or uppercase
25-
const hasJSXLike = /<[A-Za-z]/.test(source);
25+
const hasJSXLike = /<[A-Z][\w]*[\s/>]|<[a-z]+[\s\/>]/.test(source);
2626
if (!hasJSXLike) {
2727
return callback(null, source);
2828
}

0 commit comments

Comments
 (0)