postcss-wrap icon indicating copy to clipboard operation
postcss-wrap copied to clipboard

Don't use `colors` when used in web browsers

Open ingmarh opened this issue 6 years ago • 0 comments

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.

ingmarh avatar Jul 27 '17 13:07 ingmarh