airbnb / goji-js

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

Refactor CSS unit transforming #231

Closed malash closed 1 year ago

malash commented 1 year ago

This PR introduced a new option css.unit in goji.config.js to enable CSS unit transforming.

css.unit

There is a built-in PostCSS plugin called postcss-transform-unit that can be used to transform CSS units in all files. In some cases, you may want to convert the usage of px to rpx or vice versa. You can use this option.

The default will be changed to keep in the future.