postcss-rtl icon indicating copy to clipboard operation
postcss-rtl copied to clipboard

Support postcss v8.0.0

Open mjhenkes opened this issue 5 years ago • 3 comments

Upgraded postcss-rtl to support postcss v8.0.0.

I followed this guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration

The diff looks messier than it is, the plugin is largely unchanged besides what was recommended in the guide.

I did not look at optimizing the plugin, I think that is a task better left to those more familiar with this plugin.

I considered opening up the version to support both 7 and 8 but that didn't seem possible due to the changes for the v8.0.0 api and the fact that the postcss-import dependency only support version 8.

One wrinkle is that postcss removed the vendor api in version 8, but on inspection it was a simple string replace function and I directly added that to this plugin. See: https://github.com/postcss/postcss/blob/7.0.35/lib/vendor.es6#L42 for the original post css implementation.

Closes #71

mjhenkes avatar Nov 25 '20 19:11 mjhenkes

@mjhenkes I can confirm this worked for me using your master branch inside package.json. It would be nice to have a temporary NPM release ( like postcss-rtl-fix ) of your fork cause I doubt this PR will be merged soon.

henryruhs avatar Nov 26 '20 08:11 henryruhs

@redaxmedia, I went ahead and published a temporary fork. I plan to use it until I can get my projects migrated over to rtlcss as it seems to be more actively maintained than this project.

https://www.npmjs.com/package/@mjhenkes/postcss-rtl

mjhenkes avatar Dec 01 '20 20:12 mjhenkes

@mjhenkes Another fix was to add "rtlcss": "2.6.1" to the dependencies ... but I don't quite understand why because this plugin still should not be compatible then!?

henryruhs avatar Dec 03 '20 09:12 henryruhs

New release closes this

bab2683 avatar Nov 23 '22 07:11 bab2683