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

[issue]considering support jsx in Vue? #861

Open
cdll opened this issue Jan 24, 2019 · 1 comment
Open

[issue]considering support jsx in Vue? #861

cdll opened this issue Jan 24, 2019 · 1 comment

Comments

@cdll
Copy link

cdll commented Jan 24, 2019

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~

@cdll
Copy link
Author

cdll commented Jan 24, 2019

the error that i got
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant