css-modules/postcss-modules-extract-imports

Don’t use parent#push

ai opened this issue · 5 comments

ai commented

According PostCSS docs, Container#push is low level method and should not be used by plugins.

This method is for parsers only. It doesn’t contains checks as result it is easy to broke AST by putting wrong nodes.

This line produces broken AST, because it doesn’t set a parent property.

@geelen You should replace push() to append().

Here is a issue because of this bug: cssnano/cssnano#163 (comment)

ai commented

@geelen what do you think about it?

Can we get this fixed? 👍

Fixed at 67ffacf <3

Published 1.0.1 as well

Thanks!