babel-plugin-transform-vue-jsx icon indicating copy to clipboard operation
babel-plugin-transform-vue-jsx copied to clipboard

incorrect h injection

Open egoist opened this issue 7 years ago • 0 comments

const foo = {
  router() {
    return {
      render() {
        return (
          <div>
            <h1>Hello World!</h1>
          </div>
        )
      }
    }
  }
}

Results in:

const foo = {
  router() {
+    const h = this.$createElement;
     return {
       render() {
         const h = arguments[0];
         return h("div", [h("h1", ["Hello World!"])]);
       }

     };
  }

};

egoist avatar May 25 '18 06:05 egoist