I'm trying to write a VueJS component that I will then be converting to a canvas element so that it can be downloaded as an image. I'm using the library rasterizeHTML to convert my HTML to canvas.
This is working well; however, I'm finding that the library doesn't respect styles written in the tag of a Vue component, but I've managed to get it working using inline styles.
That leads me to my question: I'd prefer to write CSS in the Vue tag of my single file component, but I'm looking for some way to then transform that CSS into inline styles. This would ideally be done through Webpack. Are there any solutions to do this? I'm looking for a way to directly transform the CSS into the inline styles for each component (not though computed properties or methods) for the easiest management of my CSS.