Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please indicate reliable CDN links in the docs/readme? #380

Open
tomasts248 opened this issue Oct 5, 2023 · 7 comments
Open

Please indicate reliable CDN links in the docs/readme? #380

tomasts248 opened this issue Oct 5, 2023 · 7 comments

Comments

@tomasts248
Copy link

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")

@tomasts248
Copy link
Author

@tomasts248
Copy link
Author

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 “/”.

@tinchox5
Copy link

tinchox5 commented Oct 20, 2023

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

@tomasts248
Copy link
Author

tomasts248 commented Oct 21, 2023

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...

@tinchox5
Copy link

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>

@tomasts248
Copy link
Author

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

@tomasts248
Copy link
Author

tomasts248 commented Nov 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants