WebReflection / ucdn

A µcompress based CDN utility, compatible with both Express and native http module
ISC License
67 stars 1 forks source link

Loading resources from unpkg #2

Closed albertosantini closed 4 years ago

albertosantini commented 4 years ago

Thanks for the tool.

Maybe I have been missing something, but launching ucdn in a folder: and browsing a html resource, I see a lot of resources loaded from unpkg, not expected and not included in the html resource.

Any hint?

WebReflection commented 4 years ago

If the html file contains external resources, those are loaded, like it is for any CDN. It optimizes folder files, nothing else

WebReflection commented 4 years ago

To clarify, this is literally a CDN, nothing else.

albertosantini commented 4 years ago

Yep. Completely an allucination on my side.

I forgot the following import

import { render, html } from "https://unpkg.com/uhtml?module";

inside a js.

Sorry for the waste of time.

WebReflection commented 4 years ago

Save https://unpkg.com/uhtml/index.js as source, as example, and use it as script: it’ll turned out minified and you can const {render, html} = uhtml instead