0

I don't get my tag to work in my Vue project. I have create a Stencil.js component test, its just the origional code from stencil when you create an web component. I have upload it to NPM as a public package.

So now it should just be to install and import the package in my vue app, but I cant make it work. (Vue app just build with Vue CLI and have typescript)

When I do the npm install stencil-component-test --save I can see the code in my node_modules, so that works.

I try to import and use it in my Home.vue

<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    <HelloWorld msg="Welcome to Your Vue.js App" />
    <my-component></my-component>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import MyComponent from "stencil-component-test";

export default {
  name: "home",
  components: {
    HelloWorld,
    MyComponent
  }
};
</script> 

Its just an empty tag if I look in chrome dev-tools. What am I doing wrong?

Johan Byrén
  • 890
  • 2
  • 13
  • 28

0 Answers0