Importing library on server side causes crash
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 286
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
When importing this library I get the error that the window is not defined as it is rendered on the server side.
In the js folder of this project the window is not used but when checking out the lib/draftjs-utils.js I see that there is a reference to the window. It would be nice if you could alter it so it doesn't crash on SSR 😢
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with lib/draftjs-utils.js and compare it with the js folder to trace the server-side import path and the window reference. Verify that importing the library during SSR no longer throws a window-not-defined error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100