git clone git@github.com:moroshko/gatsby-emotion-theme-issue.git
cd gatsby-emotion-theme-issue
npm install
cd website
npm install
npm start
Open the developer tools and you'll see that website/src/components/button
gets the theme
as expected.
Now, in website/src/pages/index.js
, import src/components/button
instead, and you'll see that the Button
doesn't get the theme
anymore.