示例工程 16-mini-bundler

16-mini-bundler/01-mini-bundler/src/cycle-b.js

javascript · 0.2 KB

运行:16 · 迷你 bundler

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

// src/cycle-b.js —— B 又依赖 A,形成环
const a = require('./cycle-a');
 
exports.name = 'b';
exports.sawA = a.name;
exports.aBName = a.bName; // 此时 a 还没执行完 → undefined