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

Server rendering broken with module declaration #36

Open
MrLoh opened this issue Mar 19, 2019 · 3 comments
Open

Server rendering broken with module declaration #36

MrLoh opened this issue Mar 19, 2019 · 3 comments

Comments

@MrLoh
Copy link

MrLoh commented Mar 19, 2019

Since the module entry point declaration was added in v4.0 this library can't be used in a server rendering context anymore, as node will choose the module entry point which contains uncompiled JSX. If there is no particular reason to have the module export point to an uncompiled version, it should be removed or point to a compiled version

@3rd-Eden
Copy link
Contributor

That is odd, as Node.js should be using main as entry point, not module.

@3rd-Eden
Copy link
Contributor

Do you have steps to reproduce? Simply requiring the svgs module in the node cli works as intented.

@MrLoh
Copy link
Author

MrLoh commented Mar 20, 2019

@3rd-Eden hmm, I am using razzle which uses web pack on both ends. I can't share my code since it's private, but editing the package.json of svgs in my node_modules fixes the issue. Any reason you don't just provide a compiled version of the lib?

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