I’m working on a React app using Vite and I want to create a single embed.js file that I can include in any website to load my widget. The embed.js file should contain both the JavaScript and CSS. I am using the vite-plugin-css-injected-by-js plugin to inject CSS via JavaScript.
What I have tried:
screenshot is attached,
[]
1