You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using @vue/component-core's parse() function while building an application for production, all html comments are lost.
In vue-docgen-api, I use the comments to determine information about the component. Even if I don't package the component entirely with its comments they are useful at build time when the NODE_ENV is set to 'production'.
What does the proposed API look like?
Add a comments option to the ParseOptions false by default in prod, useless (and considered true) in dev that would override line 231 or parse.ts
What problem does this feature solve?
When using
@vue/component-core
'sparse()
function while building an application for production, all html comments are lost.In vue-docgen-api, I use the comments to determine information about the component. Even if I don't package the component entirely with its comments they are useful at build time when the NODE_ENV is set to 'production'.
What does the proposed API look like?
Add a
comments
option to theParseOptions
false by default in prod, useless (and considered true) in dev that would override line 231 orparse.ts
https://github.com/vuejs/vue-next/blob/ac81dcf0cc7f5fc722a0c14d1cc92ece5cc0db07/packages/compiler-core/src/parse.ts#L231-L235
Usage:
Without the perf cost of having the comments all the time, we would still be able to extract them optionally.
I could make a PR if need be.
The text was updated successfully, but these errors were encountered: