2.0.0-beta.0.0.0 • Published 2 years ago
@bluejsx/vite-plugin-blue-hmr v2.0.0-beta.0.0.0
Vite Plugin Bluejsx HMR
This is a plugin to enable HMR (Hot Module Replacement) into your vite environment.
installation
npm i -D @bluejsx/vite-plugin-blue-hmr
Usage
import HMRLoader, { transform } from '@bluejsx/vite-plugin-blue-hmr'
transform
transform(code: string) : string
- This takes in BlueJSX code and returns modified code which enables HMR
- This would be useful if you want to add HMR for other file formats (e.g.
.mdx
)
HMRLoader
plugin
/** @type {import('vite').UserConfig} */
export default ({
esbuild: {
jsxFactory: 'Blue.r',
jsxFragment: 'Blue.Fragment',
jsxInject: `import Blue from 'bluejsx'`
},
plugins: [
HMRLoader(),
],
base: './',
assetsInclude: 'public/*'
})
2.0.0-beta.0.0.0
2 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.11
3 years ago
1.1.10
3 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.1.10
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago