Best/valid way to include an external vue-component

  • Hello everybody,

    I would like to use an third-party vue-component. Installing it with NPM is no problem - I'm also able to register it using


    Code
    1. $scripts->register( 'custom-component', 'foo/bar:app/bundle/custom-component.js', [ 'vue' ]);


    But I can not use it in any frontend view of Pagekit.


    The component's docs show that I need to do something like:


    Code
    1. var CustomComponent = require('vue-custom-component');

    and I think I can handle that by writing some JS that does exactly this - but for me this feels like a workaround. Maybe there's an easier way?

  • Hello everybody,

    I tried it this way:



    And registered it. But if I add


    Code
    1. <custom-component></custom-component>


    nothing happens... :-/