这是indexloc提供的服务,不要输入任何密码
Skip to content

skyrpex/vue-jsx-hot-loader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-jsx-hot-loader

Greenkeeper badge

Works with:

Vue 2 Webpack

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

NOTE: This plugin is still an experiment.

Installation

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

About

Webpack loader for Vue.js v2 components with JSX render functions

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5