Embeddable components
Hello, I would like to make a component in my app embeddable to other websites. I would like for the interface to look something like this:
It would be great to have this within the same codebase as my nuxt 3 application. What would be the best way to achieve this?
2 Replies
Did you ever find out how to do this?
For us it's currently in the backlog but I had a very basic example (i couldn't yet figure out how to get the css working) as follows:
I have created a "widgets" in the root level of the project with the following structure:
- /widgets
-- /components
--- test.vue
-- main.js
-- vite.config.js
vite.config.js
main.js
test.vue
package.json
When running the build:fl-component script the outputted js and css will be available inside the public/js folder. You can change this however you'd like in the vite.config.js