QuickBase / babel-plugin-styled-components-css-namespace

A babel plugin to add css namespaces (and increase specificity) of styled-component classes.
MIT License
118 stars 32 forks source link

Remove node version restrictions #62

Closed weatherstar closed 4 years ago

weatherstar commented 4 years ago

Reason for this change

When the node version is greater than 12.4.0, the plug-in cannot work properly, and the node version needs to be limited to 12.4.0 or less, which conflicts with the established node version of many projects.

If the project using this plug-in needs to upgrade the node version for some reason in the future, it will be big trouble.

Overview of the change

Reason for the code change

When the node version is greater than 12.4.0 and the code executes to postcss.process, this promise neither will be resolved nor be rejected, so the whole process is stuck in loopWhile. But if we change the execution method of postcss.process from asynchronous to synchronous, it works well with all node version.

Tests

nvanselow commented 4 years ago

This fix has been deployed to version 1.0.1. Thanks again!

weatherstar commented 4 years ago

Thank you very much! 😸