Custom Vue Component - Nested Vue component Reference

I’m building a custom vue component and I’m reaching a point where i would like to externalize some of the code to another vue file (ex. Collapse Component). Can I create an external .vue file in my code base for the weweb vue component and import that into the wwSection.vue file? I know it might seem like the obvious thing to do is to create another ww-custom component but the component isn’t being used as an sub element. It’s rather rendered an svg element on a canvas in a simulated graph within the main file.

Hope this makes sense!

1 Like

In your custom element you can import and use others vue elements.

Good to know! Thanks @dorilama. I was just concerned that everything had to be contained within the wwSection.vue file to be ported into weweb. Was getting issues with external vue components imports but I think that was more on my end now that I know it’s possible.

You can use any separate file as you want, you just need to have only one entry point correctly name which is using the other ones :). You can take a look at the datagrid for an example.
Only known restrictions at the moment is for static/public files.