Here is what I have:
A VUE ClI 3 Project with lots of components and stuff going on.
What I need:
Is a way to reuse this project and to include it on my client's website very simple. I am thinking of just adding one JS file and maybe a little HTML snippet.
What I have done:
I have been using VUE CLI 3 to export my project as a web component. This is working great because now I just have to use one JS file and the web component tag I created.
The Problem:
The problem is that everything I have styled with Tailwindcss in my project is not being styled inside the web component, because these styles seem to be not included.
Normally you would include your styles in every Vue component itself. (I am using .vue single components) But since I am using TailwindCSS, I used a lot of classes on my HTML tags. This is working fine in my VUE CLI 3 project because I am using PostCSS for TailwindCSS. But it is not working anymore when I create the web component. I also don't have like an outputted CSS file. I only have my tailwind.css file:
@tailwind preflight;
@tailwind components;
// my custom styles
@tailwind utilities;
My question:
So how I can get the TailwindCSS styles, as wells my custom CSS styles into the web component?
<style src="./yourCsslib.css" lang="scss" scoped> </style>in your single file component - Boussadjra Brahim