File tree 1 file changed +6
-8
lines changed
packages/compiler-core/src
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -216,13 +216,17 @@ function parseChildren(
216
216
removedWhitespace = true
217
217
nodes [ i ] = null as any
218
218
} else {
219
- // Otherwise, condensed consecutive whitespace inside the text down to
220
- // a single space
219
+ // Otherwise, condensed consecutive whitespace inside the text
220
+ // down to a single space
221
221
node . content = ' '
222
222
}
223
223
} else {
224
224
node . content = node . content . replace ( / [ \t \r \n \f ] + / g, ' ' )
225
225
}
226
+ } else if ( ! __DEV__ && node . type === NodeTypes . COMMENT ) {
227
+ // remove comment nodes in prod
228
+ removedWhitespace = true
229
+ nodes [ i ] = null as any
226
230
}
227
231
}
228
232
} else if ( parent && context . options . isPreTag ( parent . tag ) ) {
@@ -239,12 +243,6 @@ function parseChildren(
239
243
}
240
244
241
245
function pushNode ( nodes : TemplateChildNode [ ] , node : TemplateChildNode ) : void {
242
- // ignore comments in production
243
- /* istanbul ignore next */
244
- if ( ! __DEV__ && node . type === NodeTypes . COMMENT ) {
245
- return
246
- }
247
-
248
246
if ( node . type === NodeTypes . TEXT ) {
249
247
const prev = last ( nodes )
250
248
// Merge if both this and the previous node are text and those are
You can’t perform that action at this time.
0 commit comments