Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !2304

Proof of concept: simple hot reloading

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/gaearon/hot-reloading-poc into master May 21, 2017
  • Overview 19
  • Commits 19
  • Pipelines 0
  • Changes 10

Created by: gaearon

Couldn't resist. Integrated with our error handling. (So errors cause refresh on next save.)

  • This would need a Babel transform, for now I just hardcoded what it would do
  • Only works if you have DevTools installed/enabled
  • This is annoying https://github.com/facebookincubator/create-react-app/issues/1880
  • Editing after initial error should refresh
  • Editing after compile error should still be hot
  • Chrome sourcemaps don't update https://github.com/facebookincubator/create-react-app/issues/2407
  • TESTS
  • "Click to source" breaks in overlay because after first edit, path looks like ./packages/react-scripts/template/src/Logo.js?989a:5. Need to figure out where that ?989a comes from, it doesn't make sense (all edits after the first one get that name in Sources pane). Even changing devtoolFallbackModuleFilenameTemplate to repeat devtoolModuleFilenameTemplate didn't help: webpack still tries to give different source names to the same file on first reload.

I only want to enable this for files that export a single functional component defined with JSX. The goal is not to be comprehensive but to always work well, and create trust.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/gaearon/hot-reloading-poc