示例工程 26-module-comparison-monorepo

26-module-comparison-monorepo/02-namespace-globals/index.html

html · 0.4 KB

运行:26 · namespace-globals

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

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>26 · namespace-globals</title>
</head>
<body>
<p>请打开开发者工具 Console 查看输出。</p>
<script>
  window.__APP__ = { apiBase: 'https://api.example.com' };
  window.App = { version: '1.0.0' };
</script>
<script type="module">
  import { run } from './dist/main.js';
  run();
</script>
</body>
</html>