unplugin-vue-jsx-hmr
v0.1.3
Published
Provides Vue 2/3 JSX & TSX support with HMR.
Downloads
3
Maintainers
Readme
unplugin-vue-jsx-hmr
Usage
Supports VUE2/3 non-SSR environments with hot-reload
Install
npm i unplugin-vue-jsx-hmr
// vite.config.ts
import Starter from 'unplugin-vue-jsx-hmr/vite'
// use vue2
import { viteCommonjs } from '@originjs/vite-plugin-commonjs'
export default defineConfig({
plugins: [
Starter({ /* options */ }),
// use vue2
viteCommonjs()
],
})
Example: playground/
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-vue-jsx-hmr/webpack')({ /* options */ })
]
}
// vue.config.js
module.exports = {
configureWebpack: {
chainWebpack(config) {
config.module.rules.delete('tsx')
},
plugins: [
require('unplugin-vue-jsx-hmr/webpack')({ /* options */ }),
],
},
}