@kitajs/ts-html-plugin
Advanced tools
Comparing version 4.0.0-next.0 to 4.0.0-next.1
@@ -11,3 +11,3 @@ "use strict"; | ||
function isJsx(ts, node) { | ||
return ts.isJsxElement(node) || ts.isJsxFragment(node); | ||
return (ts.isJsxElement(node) || ts.isJsxFragment(node) || ts.isJsxSelfClosingElement(node)); | ||
} | ||
@@ -48,3 +48,3 @@ exports.isJsx = isJsx; | ||
const file = node.getSourceFile(); | ||
// Validations that does not applies to fragments | ||
// Validations that does not applies to fragments or serlf closing elements | ||
if (ts.isJsxElement(node)) { | ||
@@ -57,3 +57,3 @@ // Script tags should be ignored | ||
// Safe mode warnings | ||
if (safeAttribute) { | ||
if (safeAttribute && node.children) { | ||
if ( | ||
@@ -93,2 +93,7 @@ // Empty element | ||
} | ||
// If this expression does not have children, we can ignore it | ||
// for example it could be a self closing element | ||
if (!node.children) { | ||
return; | ||
} | ||
// Look for expressions | ||
@@ -95,0 +100,0 @@ for (const exp of node.children) { |
{ | ||
"name": "@kitajs/ts-html-plugin", | ||
"version": "4.0.0-next.0", | ||
"version": "4.0.0-next.1", | ||
"homepage": "https://github.com/kitajs/html/tree/master/packages/ts-html-plugin#readme", | ||
@@ -28,4 +28,4 @@ "bugs": "https://github.com/kitajs/html/issues", | ||
"@swc-node/register": "^1.9.0", | ||
"@swc/helpers": "^0.5.6", | ||
"@types/node": "^20.11.29", | ||
"@swc/helpers": "^0.5.7", | ||
"@types/node": "^20.11.30", | ||
"@types/yargs": "^17.0.32", | ||
@@ -37,3 +37,3 @@ "fast-defer": "^1.1.8", | ||
"typescript": "^5.3.3", | ||
"@kitajs/html": "^4.0.0-next.0" | ||
"@kitajs/html": "^4.0.0-next.1" | ||
}, | ||
@@ -40,0 +40,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84157
506