kentor / www.kentor.dev

Writing on Web Development

Home Page:https://www.kentor.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node.js hot module reloading development

Globik opened this issue · comments

'To be honest I don't know how useful this is outside of my static site generator with React use case. Let me know if you have more interesting use cases!'
An interesting use case also if anyone works with es6 template literals. Like so:
P.S. it's markdown but you get idea what I writes here(without tags, but should be with tags)

var index=obj=>{
return 'html body
Hello ${obj.name}
body html'
}
module.exports={index}
And then with hot reload you can modify this module without server restarting.