-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Errors when adding default import of styled-components through WebPack's ProvidePlugin #3912
Comments
I'm experiencing this issue as well and it does seem to be some kind of conflict with the styled-components gatsby plugin since I never had this problem using ProvidePlugin with React and styled-components in non gatsby projects. Ultimately though it's not a huge deal. Perhaps when support for webpack 4 drops this problem will magically go away... |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
Description
I'm trying to add styled-components as a default import using WebPack's ProvidePlugin but when I try to use the import it fails.
Environment
Gatsby version:
^1.9.158
Node.js version:
v8.9.4
Operating System: Debian Testing (Buster)
File contents (if changed):
gatsby-config.js
:package.json
:gatsby-node.js
:gatsby-browser.js
: not changedgatsby-ssr.js
: not changedActual result
If I don't try to use
Style
everything works fine. If I as much as try toconsole.log()
it, I get this:Expected behavior
I should be able to use
Style
to created styled components in any JS module.Steps to reproduce
Just try accessing the default import in any way, for example:
I might add the the default import for
React
works just fine.The text was updated successfully, but these errors were encountered: