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

'react_from_dom_1.default is not a function' #146

Closed
adamcbrewer opened this issue May 18, 2020 · 2 comments
Closed

'react_from_dom_1.default is not a function' #146

adamcbrewer opened this issue May 18, 2020 · 2 comments

Comments

@adamcbrewer
Copy link

I have two projects I'm currently working on, one of which is a library of components using react-inlinesvg (project A) and another which imports the library (project B).

Project A has no issues with react-inlinesvg, but it's compiled to UMD using rollup. Importing any component from project A which uses react-inlinesvg seems to throw an error with the following error:

react_from_dom_1.default is not a function'

After a little digging I've found that when react-inlinesvg requires react-from-dom for some reason there is no 'default' export.

I'm thinking it might be because of a difference between our UMD and the ESM modules from react-inlinesvg. It might possibly be related to this similar issue which resolves it by using a star import.

@gilbarbara
Copy link
Owner

Hey,

This seems like a problem with rollup configuration.
Changing the typescript config isn't an option since it would force users to have the same config

@adamcbrewer
Copy link
Author

I'm actually having the same issue elsewhere so you're definitely right, thanks!

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

No branches or pull requests

2 participants