swc/spack/tests/pass/cjs/issue-967-no-recursive-require/output/entry.js
강동윤 8a01e2b7b6
Fix spack (#1016)
swc_ecma_transforms:
 - Add tests for #898 
 - dce preserves `export * from 'foo';`

swc_bundler:
 - Fix some concurrency bugs
 - Run dce only once
 - Handle `export * from 'foo'`
 - Handle namespace imports with computed key
 - Add some unit tests for `plan`
 - Handle export default decl
 - Handle simple coomon dependencies properly
2020-09-03 22:45:42 +09:00

28 lines
617 B
JavaScript

function __spack_require__(mod) {
var cache;
return function() {
if (cache) {
return cache;
}
var module = {
exports: {
}
};
mod(module, module.exports);
cache = module.exports;
return cache;
};
}
var load = __spack_require__.bind(void 0, function(module, exports) {
console.log('c');
});
var load1 = __spack_require__.bind(void 0, function(module, exports) {
console.log('b');
});
var load2 = __spack_require__.bind(void 0, function(module, exports) {
console.log('a');
});
load2();
load1();
load();