2.0.0-beta.0.0.0 • Published 1 year 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
1 year ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.11
2 years ago
1.1.10
2 years ago
1.0.1
2 years ago
1.0.0
3 years ago
0.1.10
3 years ago
0.1.9
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.0.12
3 years ago
0.0.11
3 years ago
0.0.10
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago