Open Coding-Kiwi opened 2 months ago
I created an example project https://github.com/Coding-Kiwi/vue-comments
This is the comment https://github.com/Coding-Kiwi/vue-comments/blob/master/App.vue#L5
And in the build at the end you can see https://github.com/Coding-Kiwi/vue-comments/blob/master/dist/main.78f2c16d3e664b627fa4.js ... ,Yn(ro("div",null,[pr,co(" This is a comment "),dr],undefined,undefined,undefined ...
Okay after adding
options: {
compilerOptions: {
comments: false
}
}
to the loader config it removes the comments..
The vue docs say the default is false, but only for the runtime-build which is not the case when using vue-loader
The vue-loader docs say the default compilerOptions is empty and to look at the vue-template-compiler docs
And there... the comments option is not even listed.
I have a component with a comment
I use webpack to bundle my app
The "test 123" gets removed but the "this is a test" in the html is not removed and becomes part of the minifed bundle. Here you can see an example:
I use vue 3.4.27 and vue-loader 17.4.2 I do not have specified
app.config.compilerOptions.comments
What am I missing?