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
  • Issues
  • #3120
Closed
Open
Issue created Sep 13, 2017 by Administrator@rootContributor

Completely isolate the error overlay script from the main app

Created by: gaearon

I’m worried that if we add duplicate React detection (e.g. https://github.com/facebook/react-devtools/pull/714), it will start firing in CRA development mode because react-error-overlay might ship with its own copy of React (e.g. if the app user deletes React but then adds an incompatible version). I’d like to avoid warning in such cases because it is intentional, and the iframe is meant to be completely opaque to the app developer.

I wonder if we can package the error overlay code in a way that it bundles React (rather than just importing it via CommonJS) and executes it in the context of the iframe (e.g. via iframeWindow.eval). Then DevTools shouldn’t “see“ React there.

Does this make any sense?

Assignee
Assign to
Time tracking