{"id":16533567,"url":"https://github.com/af/hmr-time","last_synced_at":"2025-07-05T06:32:49.897Z","repository":{"id":27707397,"uuid":"31194305","full_name":"af/HMR-time","owner":"af","description":"Experiments with webpack's Hot Module Replacement","archived":false,"fork":false,"pushed_at":"2015-03-30T17:55:53.000Z","size":176,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-18T07:04:27.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/af.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-23T04:45:57.000Z","updated_at":"2015-03-30T17:55:54.000Z","dependencies_parsed_at":"2022-09-03T03:43:01.085Z","dependency_job_id":null,"html_url":"https://github.com/af/HMR-time","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/af%2FHMR-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/af%2FHMR-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/af%2FHMR-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/af%2FHMR-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/af","download_url":"https://codeload.github.com/af/HMR-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241672232,"owners_count":20000745,"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":[],"created_at":"2024-10-11T18:15:14.891Z","updated_at":"2025-03-03T13:27:27.653Z","avatar_url":"https://github.com/af.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stop: HMR Time!\n\nThis repo is an experiment with [webpack](http://webpack.github.io/),\nand more specifically its [Hot Module Replacement\n(HMR](http://webpack.github.io/docs/hot-module-replacement-with-webpack.html) feature.\n\nIn development, HMR automagically syncs your front-end code with your browser\n(without refreshes) as you save it. This code syncs the following files live:\n\n* [Stylus](http://learnboost.github.io/stylus/) styles, run through\n  [autoprefixer](https://github.com/postcss/autoprefixer)\n* [React.js](http://facebook.github.io/react/) components, via\n  [react-hot-loader](https://github.com/gaearon/react-hot-loader)\n    * [Babeljs](https://babeljs.io) is also used for ES6 support\n\n\n## Usage\n\n* Run `node devserver.js`, and open `localhost:8080/app.html` in your browser.\n* Edit `main.styl` in your editor, and save it. Watch as your browser loads the\n  new css changes automatically.\n* Edit `simpleform.js` in your editor, and save it. Your browser should pick\n  up your changes in the same way, _while preserving any local state_ that you\n  created while using the page.\n\n\n## Notes/Gotchas\n\n* So far, I can only get HMR working by serving assets from / instead of /assets/\n    * see https://github.com/webpack/webpack/issues/497\n\n* Can't use HMR with extract-text-webpack-plugin, which is needed to process\n  \u0026 save styles as plain css files.\n    * Current workaround: inject styles via `require()` when in development,\n      use regular css files for production/build usage.\n    * See https://github.com/webpack/extract-text-webpack-plugin/issues/30\n\n\n## TODO\n\n* Conditional usage of css require (based on NODE_ENV)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faf%2Fhmr-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faf%2Fhmr-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faf%2Fhmr-time/lists"}