PurifyCSS removes necessary selector

328 views Asked by At

I have a webpack bundled react app and am trying to slim down its css that's extracted using PurifyCSS library. However, I'm not having much success with running the PurifyCSS CLI as it appears to be removing too much css.

For example, it's removing this line from my bundled css file:

brand-card img{height:50px;width:50px;}

Even though this is used in my bundled js file:

_react2.default.createElement(
    'div',
    { className: 'brand-card' },
    _react2.default.createElement('img', { src: (0, _index.getUserImageThumbnailUrl)(userId, 2) }),
    spaceOwner,
    _react2.default.createElement(
        'div',
        { className: 'brand-card__description' },
        description
    )
),

Is PurifyCSS not robust enough to handle these cases?

0

There are 0 answers