postcss-wrap
postcss-wrap copied to clipboard
Don't use `colors` when used in web browsers
In a universal app, we want to use postcss-wrap
also on the client-side with Webpack. Unfortunately, our build fails with Critical dependencies
warnings caused by this issue with the colors
package.
This change allows to have module bundlers like Webpack leave out the colors
dependency in the resulting browser bundle (e.g. for use with universal apps). colors
doesn't seem to work in web browsers anyway.
Also, use the safe API of colors
, which doesn't extend String.prototype
.