The site has the main js, and js for a specific page, which is then taken from the server. Basically, js I create an instance of vue, is it possible after creation, like later, when I get js for a page, to register new components in it? Or do you need to create a new vue instance? How to do it?

    1 answer 1

    If I understood everything correctly, then when the second script is loaded, then it must have a Vue instance that is initialized in the first script. You can make it global so that it is available in the second script, and then call

    Vue.component('my-component-name', MyComponent)

    Then all new registered components will be available in the second script.

    • Thanks, it helped. - vvtvvtvvt1