UNPKG

@uupaa/dynamic-import-polyfill

Version:
38 lines (32 loc) 1.17 kB
<!DOCTYPE html><html><head><meta charset="utf-8"><title>dynamic-import-polyfill</title> </head> <body> <div>Back to <a href="https://github.com/uupaa/dynamic-import-polyfill">dynamic-import-polyfill</a> repository</div> <div class="link-contener"></div> <script> window.onerror = (msg, file, line, column, err) => { console.error(msg, file, line, column, err); document.body.innerHTML += `<p>${msg}, ${file}, ${line}, ${column}, ${err}</p>`; }; </script> <script type="module"> import "./link.js"; </script> <script type="module"> import { importModule } from "../importModule.js"; (async() => { const Modules = { a: "https://uupaa.github.io/dynamic-import-polyfill/test/a.js", b: "https://uupaa.github.io/dynamic-import-polyfill/test/b.js", c: "https://uupaa.github.io/dynamic-import-polyfill/test/c.js", }; console.log("use native"); // use native const { a } = await import(Modules.a); const { default: b } = await import(Modules.b); const { c } = await import(Modules.c); console.log( a(), b(), c() ); })(); </script> </body> </html>