Skip to content

Unable to use Web Components #46

@DatReki

Description

@DatReki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions