menu

emotion

Emotion is a css-in-js library focused on performance and developer experience

Channels
# All channels
view-forward
# General
view-forward
# Development
view-forward
# Help
view-forward
# Off Topic
view-forward
Team

Webpack Parsing emotion in JSX

September 26, 2018 at 3:46am

Webpack Parsing emotion in JSX

September 26, 2018 at 3:46am
Hello!
I am struggling with getting emotion to work with webpack in my JSX files. Specifically
ERROR in ./src/app/components/product-card/product-card.jsx
[0] Module parse failed: Unexpected token (30:2)
[0] You may need an appropriate loader to handle this file type.
[0] |
[0] | const Name = styled('div')({
[0] | ...BASE_TEXT,
[0] | fontSize: 20,
[0] | color: BLACK

October 8, 2018 at 3:42pm
Can you share your webpack configuration file and version number?
  • reply
  • like
Hi It turns out that the version of node I was using did not support the spread ... operator. Thanks for getting back to me! :)
like-fill
1
  • reply
  • like