1

I have to create an package of vue component and then install it in another project. My code sample is given here. After using npm run build command I got a converted js file. I install it in another project. And in my project in main.js, I am using below line to add this dependency.

 import 'test' 

but in my browser I am getting this error.

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

(found in )

I dont understand what I am missing for adding funnel component to my project.

1 Answer 1

1

You need to also declare in the components option.

import test from 'test

export default {
  components: {
    test
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.