[vue] vue渲染模板时怎么保留模板中的HTML注释呢?
<template comments>
  ...
</template>
<template comments>
  ...
</template>
<template comments>
...
<template>
...
<template comments>
...
<template>
...
设置comments属性,官网默认为舍弃注释
    
    ...
注释必须位于要保留的根元素内。
comments: true 属性不适于单文件属性
<template comments>
<!--我是注释内容-->
</template>
md5-618473c6774f42c0e54fe2272f9af572
comments设为true,默认false,设为true之后将会保留且渲染模块中的HTML注释,
Vue默认舍弃注释,可以通过设置comments来开启,相关文档
<template comments>
    <div>
        <!--我是注释内容-->
    </div>
</template>
注释一定要在根元素之内
<template comments>
    <!--我是注释内容-->
    <div></div>
</template>
这样注释是不生效的。这是vue-loader提供的支持
或者
new Vue({
    el: "#app",
    comments: true
});
注意:在单文件组件设置是不生效的
<script>
    export default {
        comments: true
    }
</script>
Most helpful comment
...