Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix react-dom imports #74

Merged
merged 1 commit into from Oct 5, 2018

Conversation

kentcdodds
Copy link
Contributor

react-dom does not use named exports and when rollup attempts to bundle
these files it gives the following error:

[!] Error: 'render' is not exported by ../../node_modules/react-dom/index.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
node_modules/@reach/alert/es/index.js (19:9)
17:
18: import React from "react";
19: import { render } from "react-dom";
             ^
20: import Component from "@reach/component-component";
21: import VisuallyHidden from "@reach/visually-hidden";

react-dom does not use named exports and when rollup attempts to bundle
these files it gives the following error:

```
[!] Error: 'render' is not exported by ../../node_modules/react-dom/index.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
node_modules/@reach/alert/es/index.js (19:9)
17:
18: import React from "react";
19: import { render } from "react-dom";
             ^
20: import Component from "@reach/component-component";
21: import VisuallyHidden from "@reach/visually-hidden";
```
@ryanflorence
Copy link
Member

Huh... well alright.

@ryanflorence ryanflorence merged commit 2a20f45 into reach:master Oct 5, 2018
@kentcdodds kentcdodds deleted the pr/fix-react-dom-imports branch October 5, 2018 22:09
@TrySound
Copy link

TrySound commented Oct 9, 2018

@kentcdodds You could just specify namedExports in commonjs plugin.

@kentcdodds
Copy link
Contributor Author

Yeah, should've done that. But my preferred solution would be: facebook/react#13272

@TrySound
Copy link

TrySound commented Oct 9, 2018

Work in progress in facebook/react#13321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants