示例工程 13-esm

13-esm/03-dynamic-import/index.html

html · 0.3 KB

运行:13 · 动态 import()

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>13 · 动态 import()</title>
</head>
<body>
  <p>打开 Console 查看 import() 的异步加载、缓存与失败处理。</p>
  <script type="module">
    import { run } from './main.js';
    run();
  </script>
</body>
</html>