esbuild-hot-reload

1.0.5 • Public • Published

esbuild-hot-reload

A simple Hot Reload plugin.

npm i esbuild-hot-reload or bun i esbuild-hot-reload

Available in 2 falvors,

import { esbuildHMRPlugin } from "esbuild-hot-reload";
export const esbuildConfig = {
    //...
    plugins: [
        esbuildHMRPlugin(123)
    ]
}

Results in 1 addition of a JS code in your bundle;

import { esbuildHotRealoadFooterPlugin } from "esbuild-hot-reload";
export const esbuildConfig = {
    //...
    plugins: [
        esbuildHotRealoadFooterPlugin(123)
    ]
}

Results in addition of a JS code to each of your files in footer region

import { esbuildHotReloadString } from "esbuild-hot-reload";
const aStringJs = esbuildHotReloadString(123);

Gives you the string that is added, in case you want to do anything with it.

Readme

Keywords

Package Sidebar

Install

npm i esbuild-hot-reload

Weekly Downloads

2

Version

1.0.5

License

none

Unpacked Size

41.5 kB

Total Files

9

Last publish

Collaborators

  • spwizard01