My current project involves creating a VueJS component that will eventually be converted into a canvas element, allowing users to download it as an image. To achieve this, I am utilizing the amazing library rasterizeHTML for converting HTML to canvas.
While everything is going smoothly with the conversion process, I have encountered a minor hiccup. The library seems to ignore styles defined in the style tag of my Vue component. Fortunately, I found a workaround by implementing inline styles.
This brings me to my query: Is there a way to write CSS directly inside the script block of a Vue single file component and then automatically convert it to inline styles using Webpack? I'm seeking a solution that seamlessly transforms CSS to inline styles for each component without relying on computed properties or methods, ensuring easier CSS management.