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

Does not work with server side render #4

Open
drex44 opened this issue Oct 12, 2018 · 3 comments
Open

Does not work with server side render #4

drex44 opened this issue Oct 12, 2018 · 3 comments
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@drex44
Copy link
Owner

drex44 commented Oct 12, 2018

This package is not working with server-side rendered sites. it tries to use browser window object which is not available at the server.

Try to fix it if you have an idea about how to achieve it.
This package uses sass and react only.

@drex44 drex44 added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest labels Oct 12, 2018
@asifsha
Copy link
Contributor

asifsha commented Oct 14, 2018

@drex44
Copy link
Owner Author

drex44 commented Oct 19, 2018

@asifsha thanks for the link. but I tried it and it is still not working.
If you have a better idea then please look into it and submit PR.

EDIT: moreover, I tried the extract-text-webpack-plugin but then I am not able to load the css correctly.

@aldo-rl
Copy link

aldo-rl commented Oct 5, 2020

Solution 1:Reviewing your project I found that the problem is that window is not defined and that is why it does not work.
let window if (typeof window === 'undefined') { window = new Object(); }

Solution 2: Remove condition and assignment from windows as it is not being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants