fzankl / docsify-plugin-flexible-alerts

docsify plugin to convert blockquotes into beautiful and configurable alerts using preconfigured or own styles and alert types.
MIT License
129 stars 14 forks source link

unpkg.com CDN broken #20

Closed 6uhrmittag closed 2 years ago

6uhrmittag commented 3 years ago

Looks like using unpgk.com as CDN is broken:

Steps to reproduce

Include unpkg.com CDN snippet in the index.html:

<script src="https://unpkg.com/docsify-plugin-flexible-alerts"></script>

Expected behaviour

No 404 in console.

Using jsdelivr.com works without errors:

<script src="https://cdn.jsdelivr.net/npm/docsify-plugin-flexible-alerts@latest/dist/docsify-plugin-flexible-alerts.min.js"></script>

Actual behaviour

unpkg.com produced this error in the Google Chrome Console:

DevTools failed to load SourceMap: Could not load content for https://unpkg.com/docsify-plugin-flexible-alerts.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Possible fixes

I'm not familiar with how unpkg.com works - what I've noticed is, that https://unpkg.com/docsify-plugin-flexible-alerts would work:

curl -I https://unpkg.com/docsify-plugin-flexible-alerts.min.js.map
HTTP/2 404
date: Tue, 09 Feb 2021 06:00:03 GMT
curl -I https://unpkg.com/docsify-plugin-flexible-alerts
HTTP/2 302
date: Tue, 09 Feb 2021 05:59:41 GMT
fzankl commented 2 years ago

When using unpkg.com it is not possible to reference files directly without specifying a package version.

The following URLs should work as expected: