underfin / vite-plugin-vue2

Vue2 plugin for Vite
621 stars 84 forks source link

there would be error when I define inline jsx component. #83

Closed wqcstrong closed 3 years ago

wqcstrong commented 3 years ago

Following content In my App.vue:

<template>
  <div id="content">
    <h3>vite-plugin-vue-md lab</h3>
    <test-md></test-md>
  </div>
</template>

<script>
export default {
  components: {
    TestMd: {
      data() {
        return {
          level: 'A',
          options: ['A', 'B', 'C'],
        };
      },
      render() {
        return (
          <div>
            <select vModel={this.level}>
              {this.options.map((item) => (
                <option value={item}>{item}</option>
              ))}
            </select>
            <p>You selected: {this.level}</p>
          </div>
        );
      },
    },
  },
};
</script>

and get the error:

image

wqcstrong commented 3 years ago

add lang="jsx" will be ok