Skip to content

Question: Is it possible to load Vue component locally in 1 liquid file? #132

Answered by sergejcodes
albertpratomo asked this question in Q&A
Discussion options

You must be logged in to vote

Wouldn't recommend it, this adds unnecessary complexity.

If you want to do it anyway, you should probably try the modular approach described in the docs here. And register the components manually, something like this (in main.js):

import './my-component.vue'

const createVueAppForMyComponent = () => {
  const app = createApp({})
  app.component('my-component', component)
  return app
}

createVueAppForMyComponent().mount('#vue-for-my-component')
<div id="vue-for-my-component"></div>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by albertpratomo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants