1.0.7 • Published 2 years ago

nodejs-hot-reload v1.0.7

Weekly downloads
23
License
MIT
Repository
github
Last release
2 years ago

Node.js hot reload

Fast node.js hot-reload library. 🚀🚀

  • library is little wrapper around parcel library for enabling hot-reload for nodejs projects.

Install

npm i nodejs-hot-reload or yarn add nodejs-hot-reload

Use

  1. add this script to package.json
  • for .js
  "scripts": {
    "watch":"npx nodejs-hot-reload entry=./src/app.js outDir=./build"
    },
  • or for .ts
  "scripts": {
    "watch":"npx nodejs-hot-reload entry=./src/app.ts outDir=./build"
    },
  1. run script npm run watch or yarn watch

  2. That's it. 🤗

  • You can use it as global module as well. But I recommend to use it locally. npm i -g nodejs-hot-reload.

Available flags

NameUseDescriptiondefault
entryentry=./index.jsEntry file./scr/index.js
inspectinspectenable inspect. More here.false
outDiroutDir=./buildoutput directory for build./build
outDiroutDir=./buildoutput directory for build./build
cacheDircacheDir=./cachecache direactory/cache
minifyminifyif minifyfalse
bundleNodeModulesbundleNodeModulesif bundle node_modulesfalse
scopeHoistscopeHoistTurn on experimental scope hoisting/tree shaking flag, for smaller production bundles.false
  • works with typescript / javascript as well
  • note this library dont include typchecking for typescript. Your IDE do it for you.

  • Be aware of using relative paths.. as this library bundles output to 1 file.

1.0.7

2 years ago

1.0.6

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

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