vue2.4 set comments true, don't work
See original GitHub issueVersion
2.4.1
Reproduction link
https://codepen.io/anon/pen/dREmrV
Steps to reproduce
<template>
<!--hello-->
<div class="hello">
<h1>{{ msg }}</h1>
</div>
</template>
<script>
export default {
comments: true,
data () {
return {
msg: 'hello'
}
}
}
</script>
vue-cli comments:true The comment is gone
What is expected?
see link
What is actually happening?
use vue-cli The comment is gone
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to comment code in a vue.js file? - Stack Overflow
Any solution for Vue 3? The config "comments: true" doesn't work here. – Rafael S. Fijalkowski. Feb 18, 2021 at 15: ...
Read more >API - Vue.js
Details: When set to true , will preserve and render HTML comments found in templates. The default behavior is discarding them. Instance Properties....
Read more >How to Migrate from Vue CLI to Vite - Vue School Blog
Learn how to migrate from Vue CLI to Vite in 9 simple steps for a faster and more streamlined developer experience.
Read more >Documenting components - Vue Styleguidist
For events documentation, add a comment right above it. If your comment is at the start of the function, the event will not...
Read more >Composition api or Options api? - DEV Community 👩💻👨💻
I don't see why we distinguish between OptA (Options API) and ... But, sometimes I work on a Vue 2 project for a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah, we forgot to mention in the docs: the
comments
option only works when using the full build with in-browser compilation. It does not work in single file components.https://github.com/vuejs/vue-loader/pull/897