airbnb / goji-js

React ❤️ Mini Program
https://goji.js.org
MIT License
224 stars 27 forks source link

Replace Linaria preprocessor with postcss to fix an error of postcss-transform-unit #241

Closed malash closed 6 months ago

malash commented 6 months ago

This PR fixes a bug where the stylis package used by Linaria always removes all comments in CSS, causing the postcss-transform-unit to fail to parse the /* no */ comment.

Setting the preprocessor to none could preserve the comments but lacks some features from stylis. Therefore, I decided to implement these features in a PostCSS plugin called postcss-linaria-preprocessor.