{"id":15540978,"url":"https://github.com/thundermiracle/nextjs-hmr","last_synced_at":"2026-04-12T05:32:04.158Z","repository":{"id":98839099,"uuid":"117039633","full_name":"thundermiracle/nextjs-hmr","owner":"thundermiracle","description":"Example of enable hmr via vagrant-virtualbox or docker in nextjs","archived":false,"fork":false,"pushed_at":"2020-02-28T12:08:13.000Z","size":48,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-08T02:03:16.165Z","etag":null,"topics":["docker","hmr","nextjs","nextjs-hmr","sample-code","vagrant","virtualbox","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thundermiracle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-11T02:33:46.000Z","updated_at":"2023-04-30T13:56:55.000Z","dependencies_parsed_at":"2023-03-27T16:02:04.873Z","dependency_job_id":null,"html_url":"https://github.com/thundermiracle/nextjs-hmr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundermiracle%2Fnextjs-hmr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundermiracle%2Fnextjs-hmr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundermiracle%2Fnextjs-hmr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundermiracle%2Fnextjs-hmr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thundermiracle","download_url":"https://codeload.github.com/thundermiracle/nextjs-hmr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246117738,"owners_count":20726069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","hmr","nextjs","nextjs-hmr","sample-code","vagrant","virtualbox","windows"],"created_at":"2024-10-02T12:14:57.544Z","updated_at":"2025-12-30T22:26:03.368Z","avatar_url":"https://github.com/thundermiracle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nextjs-hmr\n#### Sample of how to enable hmr via Vagrant + Virtualbox or Docker in nextjs\n\nhmr(HotModuleReplacement) is one of the MUST HAVE functions in web development. But as \u003cstrong\u003eVirtualBox DOESN'T \u003c/strong\u003e(and will not) provide a mechanism to watch on file changes. It's only possible to \u003cstrong\u003e\u003cem\u003epoll for changes\u003c/em\u003e\u003c/strong\u003e.\nThis project is a sample of how to \u003cstrong\u003epoll for changes\u003c/strong\u003e with webpack options in nextjs.\n\n\u003cbr/\u003e\n\n#### Following environments have been tested with Windows10 + Vagrant1.9.5 + VirtualBox5.1.22:\n- CentOS7\n- Ubuntu14\n\n#### Following Docker image has been tested as well\n- node:boron-alpine\n```\ndocker-compose up -d\n```\n\n#### Test\n\nTry change the backgroud color in [index.js](/src/pages/index.js)\n\n#### Referencens:\n- https://webpack.js.org/configuration/watch/#watchoptions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundermiracle%2Fnextjs-hmr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthundermiracle%2Fnextjs-hmr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundermiracle%2Fnextjs-hmr/lists"}