vue-jsx-hot-loader
vue-jsx-hot-loader
Works with:
![]()
This loader will enable Hot Module Replacement for Webpack when using Vue's JSX render functions.
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',
},
],
},
};
Gotchas
- It only works for the default exported module (which should normally be the component itself).
Development
Playground
npm run playground
Release
npx np
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 1.4.3 | MIT | |
| 1.4.2 | MIT | |
| 1.4.1 | MIT | |
| 1.4.0 | MIT | |
| 1.3.0 | MIT | |
| 1.2.0 | MIT | |
| 1.1.7 | MIT | |
| 1.1.6 | MIT | |
| 1.1.5 | MIT | |
| 1.1.4 | MIT | |
| 1.1.3 | MIT | |
| 1.1.2 | MIT | |
| 1.1.1 | MIT | |
| 1.1.0 | MIT | |
| 1.0.1 | MIT | |
| 1.0.0 | MIT |
Pre-releases (1)
| Version | Released | License |
|---|---|---|
| 0.0.1-5 | MIT |