jorgebucaran / classcat

Build a class attribute string quickly
MIT License
905 stars 22 forks source link

v5 not working with create-react-app #38

Closed tu4mo closed 3 years ago

tu4mo commented 3 years ago

v5 breaks in a create-react-app project. Maybe related to exports in package.json and webpack 4?

https://codesandbox.io/s/hidden-rain-pldjt?file=/src/App.js

jorgebucaran commented 3 years ago

Classcat should work on Node 8, 10, 12, 14, and so on without any extra work on your side. Hopefully.

Are we missing anything in package.json to make Webpack find the export? I'm not super familiar with Webpack.

tu4mo commented 3 years ago

Tried adding "module": "index.js" and it seemed to work. I'm not very familiar with the new exports field.

jorgebucaran commented 3 years ago

Okay, cool, let's add that for now. 👍