google/playground-elements

Please indicate reliable CDN links in the docs/readme?

tomasts248 opened this issue · 7 comments

If I use:

    <script
  type="module"
  src="https://cdn.skypack.dev/playground-elements"
></script>

I'm getting: Uncaught Error: [Package Error] "@material/mwc-base" no dependency version info found. (Imported by "@material/mwc-button")

But I'm getting:

Uncaught TypeError: The specifier “tslib” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “…/” or “/”.

@tomasts248
Pls, try https://www.jsdelivr.com/package/npm/playground-elements
There are options to import playground, and it works for me!

Thanks, but why I'm getting then the above error? and how should I prevent it from happening while using jsdelivr CDN?
Edit: I'm trying to use the scripts by directly adding them to the head HTML in the front-end...

Yes, that is what I did. Here my code:

<!DOCTYPE html>
<html lang="en">
<head>
<script type="module">
 import playgroundElements from 'https://cdn.jsdelivr.net/npm/playground-elements@0.18.1/+esm'
</script>
</head>
<body>
<playground-ide >
<!-- your playground code -->
</playground-ide>
</body>
</html>

You are my hero!! it worked perfectly thank you so much IMHO this should be in the readme!!!

The only reason I'm not closing this issue is to wait till is added to the readme..