lkxian888 / postcss-px-to-viewport-8-plugin

解决 postcss-px-to-viewport 控制台输出: postcss.plugin was deprecated. Migration guide:
170 stars 29 forks source link

fix: postcss.atRule is not constructor #6

Closed zeorcpt closed 1 year ago

zeorcpt commented 2 years ago

error

when landscape: true, there is an error like: in vite 2.x: postcss.atRule is not constructor in vite 3.x: Cannot read properties of undefined (reading 'length')

reason

atRule is not a constructor in postcss 8.x see: https://postcss.org/api/#postcss-atrule

fix

replace atRule with AtRule