Closed jpollard-cs closed 7 years ago
I concur I have to go in and delete the require of the css everytime I rebuild my dependencies. r
@jpollard-cs what would be a better method to import the styles? I suppose we could make the imports optional and include them in the component exports?
So users could do import { Notifs, styles } from 'redux-notifications'
? or we could inline the base styles? Include no styles by default?
Hi, I'm in favor of letting the consumer handle the css however they wish but providing them with an implementation. So that would be the import { Notifs, styles }. That would make my life a bit easier. Thanks, r
Fixed in v3.0.0
@kylecesmat sorry just seeing your comments above, but yes I believe that was the best approach 👍
Just wanted to open this to discussion .. the way CSS is now being imported in
Notifs.js
may be a breaking change for some users who have not yet upgraded from there-notif
version of the npm package (especially for tests). Excluding this import inNotifs.js
would require a separate imports/requires byredux-notifications
package users (and therefore would be a breaking change for anyone who has already upgraded), but would also make theredux-notifications
package easier to use in universal/isomorphic applications. Thoughts?Also for anyone who does have breaking tests after upgrading from
re-notif
toredux-notifications
and your error message looks something likeSyntaxError: Unexpected token .
, assuming you're usingbabel-register
with a test setup script you can try adding the following to your setup script: