Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

[issue]considering support jsx in Vue? #861

Description

@cdll

i've got problem with bundling jsx render function in Vue2 with jspm build, such as:

//main.js
import('vue2')
.then(Vue=>{
  const vm= new Vue({
    data: {}
    ,el: '#AppMain'
    ,methods: {
      pageScrolling(){
        store.commit('pageScrolling', event.target.scrollTop)
      }
    }
    ,render(){
      return (
        <div id='AppMain' onScroll={this.pageScrolling}>
          <router-view></router-view>
          <mu-snackbar></mu-snackbar>
        </div>
      )
    }
  })
})

even after i 'd tried

//jspm.config.js
System.config({
  //...
  meta: {
    "*.js": {
      "babelOptions": {
        "es2015": true
        ,preset: ['vue']
        ,plugins: [
          "babel-plugin-transform-vue-jsx"
        ]
      }
    }
  },
  //...
})

but i used to use babel-plugin-transform-vue-jsx in my gulp and gulp-babel task to successly bundle my main.js. could anybody give me some help and thanks a lot~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions