/** * Imports an ES module from a full URL (a pinned CDN build) at run time. * * The URL is a variable, so the bundler leaves the import() alone rather than * trying to resolve it at build time. That is what the old * `new Function('u', 'return import(u)')` shim was for, but a string turned * into code is eval as far as a Content Security Policy is concerned, and * would have needed 'unsafe-eval' on every page that used it. */ export function importUrl(url: string): Promise { return import(/* @vite-ignore */ url); }