Could someone please help me and tell me what I am doing wrong here when I try to load a vaadin custom element button, because I get an error message (0 , $csb__dommodule.DomModule).import is not a function
? TYVM :)
import "@vaadin/vaadin-button";
document.getElementById("app").innerHTML = `
<h4>Vaadin Button</h4>
<section>
<vaadin-button>This is a button</vaadin-button>
</section>
`;
https://codesandbox.io/s/recursing-swartz-tbe4y?file=/src/index.js
This is a codesanbox specific issue. If you run your sandbox locally then it works fine. I just tested that
Steps:
npm i
npm start
I just created this issue in codesandbox client repo.
Working webcomponents.dev demo: https://webcomponents.dev/edit/RvnCgQUcXyckBJdjBCgl
Update: Linked Codesandbox issue has been fixed :)