WebReflection/ube

`static-params/strict` fails to import under unpkg/jsdelivr

Closed this issue · 2 comments

Seems like 35b021c breaks ESM? No idea if this is "supported" since its using jsdelivr but:

<script type="module">
    (async function () {
        let ube = await import('https://cdn.jsdelivr.net/npm/ube/+esm');
    })();
</script>

eventually tries importing https://cdn.jsdelivr.net/npm/static-params@0.2.1/strict/+esm which does not exist, but https://cdn.jsdelivr.net/npm/static-params@0.2.1/+esm does.

Edit: Same happens when trying the live example at https://codepen.io/WebReflection/pen/gOmaXrZ?editors=0010

both unpkg and jsdelivr don't seem to support standard NodeJS modules resolution, defined in here.

Skypack Dev works though, as expected, so I've updated the Pen

import {HTML, render, html} from '//cdn.skypack.dev/ube';

P.S. alternatively you can use:

import 'https://cdn.jsdelivr.net/npm/ube/es.js';

const {HTML, render, html} = ube;