A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/skyrpex/vue-jsx-hot-loader below:

skyrpex/vue-jsx-hot-loader: Webpack loader for Vue.js v2 components with JSX render functions

Works with:

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

npm install vue-jsx-hot-loader

// 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',
                    'vue-jsx-hot-loader',
                ],
            },
            // Remember to use babel on the rest of the JS files.
            {
                test: /\.js$/,
                use: 'babel-loader',
            },
        ],
    },
};

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4