@leanplum/vue-jsx-hot-loader

1.6.1 • Public • Published

@leanplum/vue-jsx-hot-loader

Works with:

Vue 2 Webpack

This loader will enable Hot Module Replacement for Webpack when using Vue's JSX render functions.

Installation

npm install @leanplum/vue-jsx-hot-loader

Usage

// path/to/component.jsx
export default {
    render(h) {
        return (
            <div>
                <p>Hello</p>
            </div>
        );
    },
};
// webpack.config.js
export default {
    // ...
    module: {
        loaders: [
            // Enable HMR for JSX.
            {
                test: /\.jsx$/,
                use: [
                    'babel-loader',
                    '@leanplum/vue-jsx-hot-loader',
                ],
            },
            // Remember to use babel on the rest of the JS files.
            {
                test: /\.js$/,
                use: 'babel-loader',
            },
        ],
    },
};

Development

Playground

npm run playground

Release

npm version <patch | minor | major>
npm run publish

Dependencies (3)

Dev Dependencies (14)

Package Sidebar

Install

npm i @leanplum/vue-jsx-hot-loader

Weekly Downloads

1

Version

1.6.1

License

MIT

Unpacked Size

8.93 kB

Total Files

6

Last publish

Collaborators

  • leanplum