TestBundlingFilesOutsideOfOutbase
---------- /out/_.._/_.._/_.._/src/entry.js ----------
// src/entry.js
console.log("test");

================================================================================
TestSplittingAssignToLocal
---------- /out/a.js ----------
import {
  foo,
  setFoo
} from "./chunk-TPCZRFNC.js";

// a.js
setFoo(123);
console.log(foo);

---------- /out/b.js ----------
import {
  foo
} from "./chunk-TPCZRFNC.js";

// b.js
console.log(foo);

---------- /out/chunk-TPCZRFNC.js ----------
// shared.js
var foo;
function setFoo(value) {
  foo = value;
}

export {
  foo,
  setFoo
};

================================================================================
TestSplittingCircularReferenceIssue251
---------- /out/a.js ----------
import {
  p,
  q
} from "./chunk-7MUWF4J7.js";
export {
  p,
  q
};

---------- /out/b.js ----------
import {
  p,
  q
} from "./chunk-7MUWF4J7.js";
export {
  p,
  q
};

---------- /out/chunk-7MUWF4J7.js ----------
// a.js
var p = 5;

// b.js
var q = 6;

export {
  q,
  p
};

================================================================================
TestSplittingCrossChunkAssignmentDependencies
---------- /out/a.js ----------
import {
  setValue
} from "./chunk-HVACKF5T.js";

// a.js
setValue(123);

---------- /out/b.js ----------
import "./chunk-HVACKF5T.js";

---------- /out/chunk-HVACKF5T.js ----------
// shared.js
var observer;
var value;
function getValue() {
  return value;
}
function setValue(next) {
  value = next;
  if (observer)
    observer();
}
sideEffects(getValue);

export {
  setValue
};

================================================================================
TestSplittingCrossChunkAssignmentDependenciesRecursive
---------- /out/a.js ----------
import {
  setX
} from "./chunk-IDNNK5VP.js";

// a.js
setX();

---------- /out/b.js ----------
import {
  setZ
} from "./chunk-XQAYB53B.js";
import "./chunk-IDNNK5VP.js";

// b.js
setZ();

---------- /out/c.js ----------
import {
  setY2,
  setZ2
} from "./chunk-XQAYB53B.js";
import {
  setX2
} from "./chunk-IDNNK5VP.js";

// c.js
setX2();
setY2();
setZ2();

---------- /out/chunk-XQAYB53B.js ----------
import {
  setX
} from "./chunk-IDNNK5VP.js";

// y.js
var _y;
function setY(v) {
  _y = v;
}
function setY2(v) {
  setX(v);
  _y = v;
}

// z.js
var _z;
function setZ(v) {
  _z = v;
}
function setZ2(v) {
  setY(v);
  _z = v;
}

export {
  setY2,
  setZ,
  setZ2
};

---------- /out/chunk-IDNNK5VP.js ----------
// x.js
var _x;
function setX(v) {
  _x = v;
}
function setX2(v) {
  _x = v;
}

export {
  setX,
  setX2
};

================================================================================
TestSplittingDuplicateChunkCollision
---------- /out/a.js ----------
import"./chunk-EG4ZQE7C.js";

---------- /out/b.js ----------
import"./chunk-EG4ZQE7C.js";

---------- /out/chunk-EG4ZQE7C.js ----------
console.log(123);

---------- /out/c.js ----------
import"./chunk-YEYDWHHT.js";

---------- /out/d.js ----------
import"./chunk-YEYDWHHT.js";

---------- /out/chunk-YEYDWHHT.js ----------
console.log(123);

================================================================================
TestSplittingDynamicAndNotDynamicCommonJSIntoES6
---------- /out/entry.js ----------
import {
  __toModule,
  require_foo
} from "./chunk-DOF77JFX.js";

// entry.js
var import_foo = __toModule(require_foo());
import("./foo-RHEBPILD.js").then(({default: {bar: b}}) => console.log(import_foo.bar, b));

---------- /out/foo-RHEBPILD.js ----------
import {
  require_foo
} from "./chunk-DOF77JFX.js";
export default require_foo();

---------- /out/chunk-DOF77JFX.js ----------
// foo.js
var require_foo = __commonJS((exports) => {
  exports.bar = 123;
});

export {
  __toModule,
  require_foo
};

================================================================================
TestSplittingDynamicAndNotDynamicES6IntoES6
---------- /out/entry.js ----------
import {
  bar
} from "./chunk-FIX3TEVC.js";

// entry.js
import("./foo-WSZEPKL7.js").then(({bar: b}) => console.log(bar, b));

---------- /out/foo-WSZEPKL7.js ----------
import {
  bar
} from "./chunk-FIX3TEVC.js";
export {
  bar
};

---------- /out/chunk-FIX3TEVC.js ----------
// foo.js
var bar = 123;

export {
  bar
};

================================================================================
TestSplittingDynamicCommonJSIntoES6
---------- /out/entry.js ----------
// entry.js
import("./foo-BQWGKGO4.js").then(({default: {bar}}) => console.log(bar));

---------- /out/foo-BQWGKGO4.js ----------
// foo.js
var require_foo = __commonJS((exports) => {
  exports.bar = 123;
});
export default require_foo();

================================================================================
TestSplittingDynamicES6IntoES6
---------- /out/entry.js ----------
// entry.js
import("./foo-HLOHNJMC.js").then(({bar}) => console.log(bar));

---------- /out/foo-HLOHNJMC.js ----------
// foo.js
var bar = 123;
export {
  bar
};

================================================================================
TestSplittingDynamicImportIssue272
---------- /out/a.js ----------
// a.js
import("./b.js");

---------- /out/b.js ----------
// b.js
var b_default = 1;
export {
  b_default as default
};

================================================================================
TestSplittingDynamicImportOutsideSourceTreeIssue264
---------- /out/entry1.js ----------
// Users/user/project/src/entry1.js
import("./package-L6SN4V3F.js");

---------- /out/entry2.js ----------
// Users/user/project/src/entry2.js
import("./package-L6SN4V3F.js");

---------- /out/package-L6SN4V3F.js ----------
// Users/user/project/node_modules/package/index.js
console.log("imported");

================================================================================
TestSplittingHybridESMAndCJSIssue617
---------- /out/a.js ----------
import {
  foo,
  init_a
} from "./chunk-XSW6IF3B.js";
init_a();
export {
  foo
};

---------- /out/b.js ----------
import {
  a_exports,
  init_a
} from "./chunk-XSW6IF3B.js";

// b.js
var bar = (init_a(), a_exports);
export {
  bar
};

---------- /out/chunk-XSW6IF3B.js ----------
// a.js
var a_exports = {};
__export(a_exports, {
  foo: () => foo
});
var foo;
var init_a = __esm(() => {
});

export {
  foo,
  a_exports,
  init_a
};

================================================================================
TestSplittingMinifyIdentifiersCrashIssue437
---------- /out/a.js ----------
import {
  a as o
} from "./chunk-R2S2ETVH.js";

// a.js
console.log(o);

---------- /out/b.js ----------
import {
  a as o
} from "./chunk-R2S2ETVH.js";

// b.js
console.log(o);

---------- /out/c.js ----------
import "./chunk-R2S2ETVH.js";

---------- /out/chunk-R2S2ETVH.js ----------
// shared.js
function n(o) {
}

export {
  n as a
};

================================================================================
TestSplittingMissingLazyExport
---------- /out/a.js ----------
import {
  foo
} from "./chunk-36BLICPM.js";

// a.js
console.log(foo());

---------- /out/b.js ----------
import {
  bar
} from "./chunk-36BLICPM.js";

// b.js
console.log(bar());

---------- /out/chunk-36BLICPM.js ----------
// empty.js
var empty_exports = {};

// common.js
function foo() {
  return [empty_exports, void 0];
}
function bar() {
  return [void 0];
}

export {
  foo,
  bar
};

================================================================================
TestSplittingNestedDirectories
---------- /Users/user/project/out/pageA/page.js ----------
import {
  shared_default
} from "../chunk-7WMS7BBG.js";

// Users/user/project/src/pages/pageA/page.js
console.log(shared_default);

---------- /Users/user/project/out/pageB/page.js ----------
import {
  shared_default
} from "../chunk-7WMS7BBG.js";

// Users/user/project/src/pages/pageB/page.js
console.log(-shared_default);

---------- /Users/user/project/out/chunk-7WMS7BBG.js ----------
// Users/user/project/src/pages/shared.js
var shared_default = 123;

export {
  shared_default
};

================================================================================
TestSplittingPublicPathEntryName
---------- /out/a.js ----------
// a.js
import("/www/b-EDTTWD26.js");

---------- /out/b-EDTTWD26.js ----------
// b.js
console.log("b");

================================================================================
TestSplittingReExportIssue273
---------- /out/a.js ----------
import {
  a
} from "./chunk-WJGWDRHM.js";
export {
  a
};

---------- /out/b.js ----------
import {
  a
} from "./chunk-WJGWDRHM.js";
export {
  a
};

---------- /out/chunk-WJGWDRHM.js ----------
// a.js
var a = 1;

export {
  a
};

================================================================================
TestSplittingSharedCommonJSIntoES6
---------- /out/a.js ----------
import {
  require_shared
} from "./chunk-JWGRGYBR.js";

// a.js
var {foo} = require_shared();
console.log(foo);

---------- /out/b.js ----------
import {
  require_shared
} from "./chunk-JWGRGYBR.js";

// b.js
var {foo} = require_shared();
console.log(foo);

---------- /out/chunk-JWGRGYBR.js ----------
// shared.js
var require_shared = __commonJS((exports) => {
  exports.foo = 123;
});

export {
  require_shared
};

================================================================================
TestSplittingSharedES6IntoES6
---------- /out/a.js ----------
import {
  foo
} from "./chunk-YKAJFEJE.js";

// a.js
console.log(foo);

---------- /out/b.js ----------
import {
  foo
} from "./chunk-YKAJFEJE.js";

// b.js
console.log(foo);

---------- /out/chunk-YKAJFEJE.js ----------
// shared.js
var foo = 123;

export {
  foo
};

================================================================================
TestSplittingSideEffectsWithoutDependencies
---------- /out/a.js ----------
import {
  a
} from "./chunk-TWOYFNBQ.js";

// a.js
console.log(a);

---------- /out/b.js ----------
import {
  b
} from "./chunk-TWOYFNBQ.js";

// b.js
console.log(b);

---------- /out/chunk-TWOYFNBQ.js ----------
// shared.js
var a = 1;
var b = 2;
console.log("side effect");

export {
  a,
  b
};

================================================================================
TestVarRelocatingBundle
---------- /out/top-level.js ----------
// top-level.js
for (var b; 0; )
  ;
for (var {c, x: [d]} = {}; 0; )
  ;
for (var e of [])
  ;
for (var {f, x: [g]} of [])
  ;
for (var h in {})
  ;
i = 1;
for (var i in {})
  ;
for (var {j, x: [k]} in {})
  ;

---------- /out/nested.js ----------
// nested.js
if (true) {
  let l = function() {
  };
  l2 = l;
  for (; 0; )
    ;
  for ({c, x: [d]} = {}; 0; )
    ;
  for (e of [])
    ;
  for ({f, x: [g]} of [])
    ;
  for (h in {})
    ;
  i = 1;
  for (i in {})
    ;
  for ({j, x: [k]} in {})
    ;
}
var a;
var b;
var c;
var d;
var e;
var f;
var g;
var h;
var i;
var j;
var k;
var l2;

---------- /out/let.js ----------
// let.js
if (true) {
  let a;
  for (let b; 0; )
    ;
  for (let {c, x: [d]} = {}; 0; )
    ;
  for (let e of [])
    ;
  for (let {f, x: [g]} of [])
    ;
  for (let h in {})
    ;
  for (let {j, x: [k]} in {})
    ;
}

---------- /out/function.js ----------
// function.js
function x() {
  var a;
  for (var b; 0; )
    ;
  for (var {c, x: [d]} = {}; 0; )
    ;
  for (var e of [])
    ;
  for (var {f, x: [g]} of [])
    ;
  for (var h in {})
    ;
  i = 1;
  for (var i in {})
    ;
  for (var {j, x: [k]} in {})
    ;
  function l() {
  }
}
x();

---------- /out/function-nested.js ----------
// function-nested.js
function x() {
  if (true) {
    let l2 = function() {
    };
    var l = l2;
    var a;
    for (var b; 0; )
      ;
    for (var {c, x: [d]} = {}; 0; )
      ;
    for (var e of [])
      ;
    for (var {f, x: [g]} of [])
      ;
    for (var h in {})
      ;
    i = 1;
    for (var i in {})
      ;
    for (var {j, x: [k]} in {})
      ;
  }
}
x();

================================================================================
TestVarRelocatingNoBundle
---------- /out/top-level.js ----------
var a;
for (var b; 0; )
  ;
for (var {c, x: [d]} = {}; 0; )
  ;
for (var e of [])
  ;
for (var {f, x: [g]} of [])
  ;
for (var h in {})
  ;
i = 1;
for (var i in {})
  ;
for (var {j, x: [k]} in {})
  ;
function l() {
}

---------- /out/nested.js ----------
if (true) {
  let l = function() {
  };
  var l2 = l;
  var a;
  for (var b; 0; )
    ;
  for (var {c, x: [d]} = {}; 0; )
    ;
  for (var e of [])
    ;
  for (var {f, x: [g]} of [])
    ;
  for (var h in {})
    ;
  i = 1;
  for (var i in {})
    ;
  for (var {j, x: [k]} in {})
    ;
}

---------- /out/let.js ----------
if (true) {
  let a;
  for (let b; 0; )
    ;
  for (let {c, x: [d]} = {}; 0; )
    ;
  for (let e of [])
    ;
  for (let {f, x: [g]} of [])
    ;
  for (let h in {})
    ;
  for (let {j, x: [k]} in {})
    ;
}

---------- /out/function.js ----------
function x() {
  var a;
  for (var b; 0; )
    ;
  for (var {c, x: [d]} = {}; 0; )
    ;
  for (var e of [])
    ;
  for (var {f, x: [g]} of [])
    ;
  for (var h in {})
    ;
  i = 1;
  for (var i in {})
    ;
  for (var {j, x: [k]} in {})
    ;
  function l() {
  }
}
x();

---------- /out/function-nested.js ----------
function x() {
  if (true) {
    let l2 = function() {
    };
    var l = l2;
    var a;
    for (var b; 0; )
      ;
    for (var {c, x: [d]} = {}; 0; )
      ;
    for (var e of [])
      ;
    for (var {f, x: [g]} of [])
      ;
    for (var h in {})
      ;
    i = 1;
    for (var i in {})
      ;
    for (var {j, x: [k]} in {})
      ;
  }
}
x();
