vuejs / rollup-plugin-vue

Roll .vue files
https://vuejs.github.io/rollup-plugin-vue
MIT License
846 stars 148 forks source link

simple issue, 'render' is overwrited #422

Closed phphe closed 3 years ago

phphe commented 3 years ago

Ignore if this is not caused by it. I am the author of he-tree-vue. I just update it to vue3. I updated rollup-plugin-vue to 6.0.0-beta.10

The issue is simple, for example, there is a vue file like follow:

<script>
export default {
  render() {
    return <div></div>
  }
}
</script>

This vue file has not \<template> because it has render. After compiled, I found follow code:

var render = function render() {};
Tree.render = render;
Tree.__file = "src/components/Tree.vue";

The render is overwrited by an empty render even it has own render. I guess the reason is the file has not template area, so it was thought to have no render.

I bypass the issue by tansform vue file to js file.

vue-bot commented 3 years ago

Hello, thank you for taking time filling this issue!

However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).

I hope to see your helper-created issue very soon!