Skip to content

Set 'React' as dependency in AMD builds of addons #9765

@flarnie

Description

@flarnie

Right now 'React' is undefined in some of our addons which may depend on it:

The problem: running these in an AMD environment without React defined globally will lead to the dependency not being found.

Probably this can be solved as follows:

  1. Manually edit the unminified version, making it work like react-dom:
    18697850_420365161667842_787782393_o
  2. Test by modify requirejs or systemjs fixtures as one-offs to test it specifically. This doesn't need to be committed.
  3. Submit a PR and a React Core maintainer will rebuild the minified version for you - this is not a process we had intended to repeat so it is not automated in an easy way to reproduce. tag @flarnie and/or @gaearon

Ideally we are not making changes to the addons code, but this is worth doing. If someone wants to work on this I'm happy to review PRs, otherwise will pick it up in the next couple of days.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions