postcss / postcss-url

PostCSS plugin to rebase url(), inline or copy asset.
MIT License
377 stars 60 forks source link

Are the arguments of `path.relative` in the wrong order? #142

Closed memememomo closed 4 years ago

memememomo commented 4 years ago

The signature of path.relative is as follows

path.relative(from, to) https://nodejs.org/api/path.html#path_path_relative_from_to

In the following code, the arguments appear to be in the wrong order, is that what you intended?

path.relative(dest, asset.absolutePath)

https://github.com/postcss/postcss-url/blob/master/src/type/rebase.js#L21