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

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

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

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

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

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

export {
  foo,
  setFoo
};

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

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

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

// b.js
var q = 6;

export {
  q,
  p
};

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

// a.js
setValue(123);

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

---------- /out/chunk-RPIUS5UE.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-NAKBUG5G.js";

// a.js
setX();

---------- /out/b.js ----------
import {
  setZ
} from "./chunk-BSMDVSN6.js";
import "./chunk-NAKBUG5G.js";

// b.js
setZ();

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

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

---------- /out/chunk-BSMDVSN6.js ----------
import {
  setX
} from "./chunk-NAKBUG5G.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-NAKBUG5G.js ----------
// x.js
var _x;
function setX(v) {
  _x = v;
}
function setX2(v) {
  _x = v;
}

export {
  setX,
  setX2
};

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

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

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

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

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

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

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

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

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

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

export {
  __toESM,
  require_foo
};

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

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

---------- /out/foo-BNHN4WV6.js ----------
import {
  bar
} from "./chunk-UDDKLWVZ.js";
export {
  bar
};

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

export {
  bar
};

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

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

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

---------- /out/foo-R2VCCZUR.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-ZBNDRRRB.js");

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

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

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

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

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

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

export {
  __toCommonJS,
  foo,
  a_exports,
  init_a
};

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

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

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

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

---------- /out/c.js ----------
import "./chunk-7N7J6VKT.js";

---------- /out/chunk-7N7J6VKT.js ----------
// shared.js
function f(o) {
}

export {
  f as a
};

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

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

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

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

---------- /out/chunk-QVTGQSXT.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-GWC2ABNX.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-GWC2ABNX.js";

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

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

export {
  shared_default
};

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

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

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

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

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

export {
  a
};

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

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

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

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

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

export {
  require_shared
};

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

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

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

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

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

export {
  foo
};

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

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

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

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

---------- /out/chunk-Y3CWGI3W.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 (; 0; )
  ;
var b;
for ({ c, x: [d] } = {}; 0; )
  ;
var c;
var d;
for (e of [])
  ;
var e;
for ({ f, x: [g] } of [])
  ;
var f;
var g;
for (h in {})
  ;
var h;
i = 1;
for (i in {})
  ;
var i;
for ({ j, x: [k] } in {})
  ;
var j;
var k;

---------- /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();
