Closed idolize closed 7 years ago
To be honest, this plugin should not copy and I don't have any clue on your issue. PR is welcome if you find a fix. But since you are using webpack I would recommend to use postcss-url with default value (rebase) and file-loader (css-loader will handle url() as require()). Otherwise take a look to some other postcss copy plugins.
@MoOx Thanks - using file-loader
and "rebase" works great for me!
now you just need pass assetsPath
option
I'm using the
postcss-url
"copy" transform over all my CSS files to ensure the images/fonts/etc. of all my dependencies end up in my "dist" as expected. However, some of my CSS paths are actually correct and do not really need rebasing/copying (the relative path stays the same).However, whenever this situation occurs, I get "Option
to
of postcss is required, ignoring" warnings becausefrom === to
.Everything works as expected, but I'd like to silence the warnings :disappointed:
(Btw, I am using this plugin via the postcss webpack loader, which does not allow explicit passing of
from
/to
options because they are automatically inferred by the webpack config)