There might be a bit of trickery needed to make this happen, but currently a .md file like this:
# Example
<example-import></example-import>
<script>
import ExampleImport from '@/components/ExampleImport.vue';
export default {
functional: true,
components: {
ExampleImport,
},
};
</script>
Will throw [Vue warn]: Error in render: "TypeError: _vm is undefined". This also happens when in .vue files, you define both a script and a template tag, instead of either/or. Would it be possible to see if someone has set functional: true on their component and inlining the template if so? This could provide quite a significant speed-up in rendering stateless components.
There might be a bit of trickery needed to make this happen, but currently a
.md
file like this:Will throw
[Vue warn]: Error in render: "TypeError: _vm is undefined"
. This also happens when in.vue
files, you define both ascript
and atemplate
tag, instead of either/or. Would it be possible to see if someone has setfunctional: true
on their component and inlining the template if so? This could provide quite a significant speed-up in rendering stateless components.