-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Resolved] SSR not possible due to lodash-es
#89
Comments
@shariffy It is possible to make this library work with Please feel free to reopen if you think you still can't integrate with nextjs. I will add this information as FAQ in README |
lodash-es
lodash-es
I have updated the title to |
Sample const withTM = require("next-transpile-modules")([
"lodash-es",
"react-d3-speedometer"
]);
module.exports = withTM(); sample code sandbox - https://codesandbox.io/s/serene-worker-h094e?file=/next.config.js:0-123 |
hi @palerdot i've other solution for next.js, it works for me! import React from 'react';
import dynamic from 'next/dynamic';
const ReactSpeedometer = dynamic(
() => import('react-d3-speedometer'),
{ ssr: false },
);
function Speedometer() {
return (
<div>
<ReactSpeedometer />
</div>
);
}
export default Speedometer; |
@warmansuganda Thank you. I will link this issue in the FAQ so that people can find the solution you suggested. You can also raise a PR for this if you are interested. |
Hi,
After having successfully used this package in a standard
react
setting, I was trying to port that code tonext.js
to enable some Server-Side rendering, when the following error was thrown:It appears from the Changelog that normal
lodash
was replaced not that long ago, without significant changes since, so I was able to downgrade to0.10.1
without much issue but thought I'd post a shout as an FYI, for future design consideration, or other people running into this.The text was updated successfully, but these errors were encountered: