question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Just following the docs while using Vue 2. The plugin recognizes the component path, but doesn’t seem to import the components.

ViteComponents({ dirs: ['./src/components'], })

Unknown custom element: <Test> - did you register the component correctly? For recursive components, make sure to provide the "name" option

<template>
    <div>
        test
    </div>
</template>

<script>
    export default {
        name: 'Test'
    }
</script>

<style lang="scss" scoped>

</style>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
antfucommented, Feb 23, 2021

Alright, I broke my words and now it’s here in v0.7.0! With these configurations:

// vite.config.js
import { createVuePlugin } from 'vite-plugin-vue2'
import ViteComponents from 'vite-plugin-components'

export default {
  plugins: [
    createVuePlugin(),
    ViteComponents({
      transformer: 'vue2', // <--
    }),
  ],
}

@Atinux Thanks for the push 😛

0reactions
pitcher-maartencommented, Feb 25, 2021

@antfu haha thanks for breaking your words, will tell if any inconveniences.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions - Vue.js
We are planning to provide extended support for Vue 2 for teams with such needs - if your team expects to be using...
Read more >
Vue - endoflife.date
Vue is a JavaScript framework for building user interfaces. ... Release, Released, Active Support, Security Support, Latest ... 2, 6 years ago.
Read more >
How long will Vue 2 be supported? : r/vuejs - Reddit
According to the roadmap, v2 will receive 1 more minor release (v2.7) which will then have 18 months of LTS. Security patches will...
Read more >
Add TypeScript Support to Vue 2 Project | Ji ZHANG's Blog
You should also be familiar with Vue, vue-loader, and webpack. Vue 2 already has good support for TypeScript, and the recently published Vue...
Read more >
@gtm-support/vue2-gtm - npm
Simple implementation of Google Tag Manager for Vue. Latest version: 2.0.0, last published: 3 months ago. Start using @gtm-support/vue2-gtm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found