Skip to content

Conversation

@flarnie
Copy link
Contributor

@flarnie flarnie commented May 26, 2017

In order to publish the react-dom-factories package we need to make it work with AMD, global scope, and all other builds.

Since this should only be published once, hopefully, my initial approach is the simplest possible and doesn't automate anything.

Next steps are to test this but I'd be happy for feedback and tips.

@flarnie flarnie added this to the 15.6 milestone May 26, 2017
@flarnie
Copy link
Contributor Author

flarnie commented May 26, 2017

Also - this is WIP because we haven't actually published the module to npm, so the 'require' in src/isomorphic/react.js will fail. That's expected for now.

var ReactBaseClasses = require('ReactBaseClasses');
var ReactChildren = require('ReactChildren');
var ReactDOMFactories = require('ReactDOMFactories');
var reactDOMFactories = require('react-dom-factories');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sooo I'm concerned about this circular dependency (this imports react-dom-factories imports react which is this) -- I think it's okay if we put it in a getter that requires it asynchronously which we'd need anyway in order to warn for it.

flarnie added 3 commits May 31, 2017 13:30
**what is the change?:**
First steps towards making this package something we can publish on 'npm' and use in a variety of contexts.

**why make this change?:**
We need to get this published to unblock the 15.6 React release.

**test plan:**
None yet.

**issue:**
facebook#9398
**what is the change?:**
Adds an Immediately Invoked Function Expression around the body of the
'react-dom-factories' module, such that it will make the module available via
'require', or via AMD, or via the global scope, depending on what is supported.

**why make this change?:**
Trying to find the simplest way possible to make this ready for `npm publish`.

**test plan:**
WIP

**issue:**
facebook#9398
**what is the change?:**
Moves `reauire('react-dom-factories')` to separate 'getter' module.

**why make this change?:**
To avoid circular dependency.

**test plan:**
WIP
@flarnie flarnie force-pushed the fixReactDomFactories branch from c25e3a5 to 6efb304 Compare May 31, 2017 20:30
@flarnie
Copy link
Contributor Author

flarnie commented May 31, 2017

Made a new cleaner PR addressing this - #9823

@flarnie flarnie closed this May 31, 2017
@flarnie flarnie deleted the fixReactDomFactories branch May 25, 2018 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants