mrnocreativity / postcss-critical-split

A PostCSS plugin that takes existing CSS files and splits out the annotated critical styles into a seperate file.
MIT License
89 stars 6 forks source link

PostCSS 8 Support #21

Closed aKzenT closed 3 years ago

aKzenT commented 3 years ago

First of all, thank you for developing this valuable plugin!

We are trying to move to PostCSS 8, but getting the following error as soon as we activate this plugin.

TypeError: node.getIterator is not a function
    at LazyResult.visitTick (C:\enbw\src\VTP\EnBW\EnBW.Vertrieb.Websites.VTP.EnBW\node_modules\postcss\lib\lazy-result.js:484:33)
    at LazyResult.runAsync (C:\enbw\src\VTP\EnBW\EnBW.Vertrieb.Websites.VTP.EnBW\node_modules\postcss\lib\lazy-result.js:372:30)
    at Object.loader (C:\enbw\src\VTP\EnBW\EnBW.Vertrieb.Websites.VTP.EnBW\node_modules\postcss-loader\dist\index.js:87:14)

I think this indicates that the plugin is not compatible with PostCSS 8. See e.g. https://github.com/postcss/postcss/issues/1414

Any chance to get this fixed?

There is a migration guide for plugins available at: https://evilmartians.com/chronicles/postcss-8-plugin-migration

rdimascio commented 3 years ago

@mrnocreativity Are you planning on making a new release for this? The latest version on npm is still using postcss 6.0.1