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

Unable to use Web Components #46

Open
DatReki opened this issue Sep 20, 2022 · 0 comments
Open

Unable to use Web Components #46

DatReki opened this issue Sep 20, 2022 · 0 comments

Comments

@DatReki
Copy link

DatReki commented Sep 20, 2022

When I try and call the components directly from the unpkg CDN (listed here) e.g:

<script src="https://unpkg.com/@glyphs/wc-core" type="module"></script>
<script src="https://unpkg.com/@glyphs/wc-brands" type="module"></script>
<script src="https://unpkg.com/@glyphs/wc-flags" type="module"></script>

I get the following error:

Uncaught ReferenceError: assignment to undeclared variable parcelRequire
wc-core:1:988

And the following warning:

Source map error: Error: request failed with status 404
Resource URL: https://unpkg.com/@glyphs/wc-core
Source Map URL: /index.js.map

(Same errors and warnings with wc-brands & wc-flags)

When I try the files locally (downloaded through jsdelivr) I get the following error:

Loading module from “https://localhost:7209/lib/glyphs/wc-core” was blocked because of a disallowed MIME type (“”)

Granted unsure if you have to call the library otherwise when used locally.
For reference, my codebase uses ASP.NET with .NET 6 and I use libman to grab the library locally but that shouldn't matter when it comes to this issue.

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

1 participant