When running a dev server with this plugin I encountered the following error:
[postcss] color.replace is not a function
VS Code/Typescript pointed me to the index.js of this plugin on line 38
Originally:
.replace("{{color}}", color.replace("#", "%23"))
Typescript didn't like this, so I updated the replace method call to 'color.toString().replace("#", "%23")' which first converts the object to a string before calling the replace method.
This resolved the issue, final replacement code for line 38 below:
Hello,
When running a dev server with this plugin I encountered the following error:
VS Code/Typescript pointed me to the index.js of this plugin on line 38 Originally:
Typescript didn't like this, so I updated the replace method call to 'color.toString().replace("#", "%23")' which first converts the object to a string before calling the replace method.
This resolved the issue, final replacement code for line 38 below:
As far as I can tell this should not cause any issues with other technologies using this plugin, and will make it play nice with Typescript.