babel-plugin-vue-jsx-hot-reload

v0.1.2
Babel plugin for hot reloading Vue 2.0 JSX component
hot reload vue jsx

babel-plugin-vue-jsx-hot-reload

Babel plugin for hot reloading Vue 2.0 JSX component.

This plugin only works with Vue 2.0 JSX and it's in very early stage. Use this for development only.

Installation

npm install --save-dev babel-plugin-vue-jsx-hot-reload

Usage

In your .babelrc:

{
  "plugins": [
        ["vue-jsx-hot-reload", { "debug": false }]
    ]
}

Then write your component like this

// You can't use export default { render(h) {} } directly
const Component = {
    prop: {....},
    render(h) {
        return (
            <div>Hello World</div>
        );
    }
};

export default Component;
// That's it !!

Options

Setting debug: true will log the JSX component name in terminal

License

MIT

npm i babel-plugin-vue-jsx-hot-reload

Metadata

  • MIT
  • Whatever
  • Iftekhar Rifat
  • released 10/28/2016

Downloads

Maintainers