[Vuejs]-How can I import a Vue component from an NPM package in a Codepen?

0👍

  1. component names should be kebab-case in DOM templates.
  2. self closing tags are not valid in DOM templates, except for void elements.
  3. use window[‘vue-expandable-grid’].default
<div id="app">
  <expandable-grid></expandable-grid>
</div>
new Vue({
  el: "#app",
  components: {
    ExpandableGrid: window['vue-expandable-grid'].default
  }
});

Leave a comment