No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    “Unknown custom element” with separate HTML files

    Help
    1
    1
    66
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rubs
      rubs last edited by

      Until recently, I used to break up my Vue components in several files.

      App.vue

      <template src="./App.html" />
      <script src="./App.js"></script>
      

      App.html

      <div style="font-size: 2em">
        <q-icon name="warning" />
      </div>
      

      It worked fine for months, but for some reason now I’m getting lots of “Unknown custom element” errors now. Embedding the template again seems to solve the problem:

      App.vue

      <template>
        <div style="font-size: 2em">
          <q-icon name="warning" />
        </div>
      </template>
      <script src="./App.js"></script>
      

      Seems like this problem was introduced in some recent Vue or Quasar build, but I can’t be sure. The odd thing is that it happend only after I started choosing Sass with SCSS syntax instead of Stylus when creating new projects using the Quasar plugin (vue add quasar). Go figure…

      I’m using Vue 2.6.10 and Quasar 1.5.11. I’ve posted a similar question in the Vue forum. Thanks for any help!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post