@vitarx/plugin-vite 1.0.0-beta.5 → 1.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,10 +55,9 @@ export function processChildren(children, ctx) {
|
|
|
55
55
|
*/
|
|
56
56
|
function processChildNode(node, ctx) {
|
|
57
57
|
if (isJSXText(node)) {
|
|
58
|
-
|
|
59
|
-
if (!trimmed)
|
|
58
|
+
if (!node.value.trim())
|
|
60
59
|
return null;
|
|
61
|
-
const collapsed =
|
|
60
|
+
const collapsed = node.value.replace(/\s+/g, ' ');
|
|
62
61
|
return t.stringLiteral(collapsed);
|
|
63
62
|
}
|
|
64
63
|
// 处理 JSX 表达式容器,递归处理容器内的表达式
|