Following the usage at https://ionicons.com/usage, the ion-icon displays but I get this warning:
Failed to resolve component: ion-icon
My steps were:
- I used
@vue/cli@4.5.11to create a new app (vue create projectname) - added
<ion-icon name="heart"></ion-icon>toHelloWorld.vue - added
<script type="module" src="https://unpkg.com/ionicons@5.0.0/dist/ionicons/ionicons.esm.js"></script>to public/index.html
I've tried app.config.isCustomElement = tag => tag.startsWith('ion') which created another warning saying the option is only respected when using the runtime compiler, but I was able to suppress it by adding a vue.config.js with module.exports = {runtimeCompiler: true}. No effect on the ion-icon warning. This might be linked to needing to use a custom vue-loader but is there an easy way to get rid of this warning?