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

Styled-components break on reload. #2

Open
caseyyee opened this issue Apr 11, 2019 · 3 comments
Open

Styled-components break on reload. #2

caseyyee opened this issue Apr 11, 2019 · 3 comments

Comments

@caseyyee
Copy link
Contributor

caseyyee commented Apr 11, 2019

When building, breaks on reload.

@caseyyee
Copy link
Contributor Author

Looks like styled-component hot reload issue.

vercel/next.js#4068

@caseyyee caseyyee changed the title svg errors Styled-components break on reload. Apr 18, 2019
@maddoxnelson
Copy link

maddoxnelson commented Apr 26, 2019

Having this same problem, just posting here to say that I support you.

I was able to fix it by adding a .babelrc file with this setup:

    "presets": ["next/babel"],
    "plugins": [["styled-components", { "ssr": true }]]
}

And I had to install "babel-plugin-styled-components": "^1.10.0",.

(It was basically the solution described at the bottom of this issue: vercel/next.js#4068)

@caseyyee
Copy link
Contributor Author

@maddoxnelson fantastic, thanks for the pointers. It doesn't effect the deployed site (good), but it's extremely frustrating from a workflow/dev standpoint (sucks). Appreciate it!

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