Giter VIP home page Giter VIP logo

Comments (9)

egoist avatar egoist commented on April 27, 2024 3

Well, try CodePan 😂 https://codepan.net/boilerplate/vue-jsx 100% Vue JSX support.

from babel-plugin-transform-vue-jsx.

mcshaman avatar mcshaman commented on April 27, 2024 1

Although a bit finicky, webpackbin allows to use JSX. Here's a basic example using Vue and JSX.

You need to configure webpackbin to use Vue and tell babel to support JSX.

The webpackbin link goes to some malicious website. Please kill the link.

from babel-plugin-transform-vue-jsx.

LinusBorg avatar LinusBorg commented on April 27, 2024

I think for this to work, Codepen etc. would have to provide a way to add individual settings to the babel config, since you have to tell babel that you use this plugin:

{
  "presets": ["es2015"],
  "plugins": ["transform-vue-jsx"]
}

from babel-plugin-transform-vue-jsx.

p-adams avatar p-adams commented on April 27, 2024

Okay. So I tried to use vue cli with vue 2.0 and npm install this stuff here:
npm install babel-plugin-syntax-jsx\ babel-plugin-transform-vue-jsx\ babel-helper-vue-jsx-merge-props\ --save-dev

But I got errors and it would not install the plugins. I know Vue 2.0 is not out yet; however, I am eager to start using it with JSX and would like to get started. How do I configure vue-cli so I can easily use the JSX plugin?

Thanks

from babel-plugin-transform-vue-jsx.

LinusBorg avatar LinusBorg commented on April 27, 2024

If it did not install the plugins, then you had a problem with npm, not Vue. At least that's what I have to assume because you did not mention what errors you had occur.

Installations instructions are in the README, if you get stuck you can always ask on the forum.vuejs.org

from babel-plugin-transform-vue-jsx.

nddery avatar nddery commented on April 27, 2024

Although a bit finicky, webpackbin allows to use JSX. Here's a basic example using Vue and JSX.

You need to configure webpackbin to use Vue and tell babel to support JSX.

screen shot 2017-01-18 at 17 19 57

from babel-plugin-transform-vue-jsx.

reverland avatar reverland commented on April 27, 2024

For people who need a simple pure browser based vue playground with jsx support , check vuep.

Even vuex may be possible with extra effort : )

SO, Maybe the browser used babel plugin for vue jsx is useful? #53

from babel-plugin-transform-vue-jsx.

nickmessing avatar nickmessing commented on April 27, 2024

@p-adams, as commented above, you can use @egoist's project for that.

from babel-plugin-transform-vue-jsx.

egoist avatar egoist commented on April 27, 2024

Just FYI, CodeSandbox has great Vue (including Vue JSX) support: https://codesandbox.io/s/vue

from babel-plugin-transform-vue-jsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.