Skip to content

Example of enable hmr via vagrant-virtualbox or docker in nextjs

License

Notifications You must be signed in to change notification settings

thundermiracle/nextjs-hmr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nextjs-hmr

Sample of how to enable hmr via Vagrant + Virtualbox or Docker in nextjs

hmr(HotModuleReplacement) is one of the MUST HAVE functions in web development. But as VirtualBox DOESN'T (and will not) provide a mechanism to watch on file changes. It's only possible to poll for changes. This project is a sample of how to poll for changes with webpack options in nextjs.


Following environments have been tested with Windows10 + Vagrant1.9.5 + VirtualBox5.1.22:

  • CentOS7
  • Ubuntu14

Following Docker image has been tested as well

  • node:boron-alpine
docker-compose up -d

Test

Try change the backgroud color in index.js

Referencens:

Releases

No releases published

Packages

No packages published