repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/import-wasm-wasm/index.js
test/cases/wasm/import-wasm-wasm/index.js
it("should allow to run a WebAssembly module with imports", function() { return import("./wasm.wat").then(function(wasm) { const result = wasm.addNumber(20); expect(result).toEqual(42); }); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/table/test.filter.js
test/cases/wasm/table/test.filter.js
"use strict"; const supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); module.exports = () => supportsWebAssembly();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/table/index.js
test/cases/wasm/table/index.js
// the message is inconsistency between some nodejs versions const UNKNOWN_FUNCTION_TABLE = /table index is out of bounds|invalid index into function table|invalid function/; it("should support tables", function () { return import("./wasm-table.wat").then(function (wasm) { expect(wasm.callByIndex(0)).toEqual(42); ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/imports/test.filter.js
test/cases/wasm/imports/test.filter.js
"use strict"; const supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); module.exports = () => supportsWebAssembly();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/imports/index.js
test/cases/wasm/imports/index.js
it("should allow to run a WebAssembly module with imports", function() { return import("./wasm.wat?1").then(function(wasm) { const result = wasm.addNumber(3); expect(result).toEqual(11); }); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/imports/module.js
test/cases/wasm/imports/module.js
export function getNumber() { return 8; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/wasm-explorer-examples-sync/test.filter.js
test/cases/wasm/wasm-explorer-examples-sync/test.filter.js
"use strict"; const supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); module.exports = () => supportsWebAssembly();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/wasm-explorer-examples-sync/index.js
test/cases/wasm/wasm-explorer-examples-sync/index.js
it("Q_rsqrt should work", function() { return import("./tests").then(t => t.run_Q_rsqrt()); }); it("testFunction should work", function() { return import("./tests").then(t => t.run_testFunction()); }); it("fact should work", function() { return import("./tests").then(t => t.run_fact()); }); it("popcnt should work...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/wasm-explorer-examples-sync/tests.js
test/cases/wasm/wasm-explorer-examples-sync/tests.js
import * as Q_rsqrt from "./Q_rsqrt.wasm"; import * as testFunction from "./testFunction.wasm"; import * as fact from "./fact.wasm"; import * as popcnt from "./popcnt.wasm"; import * as fastMath from "./fast-math.wasm"; import * as duff from "./duff.wasm"; export function run_Q_rsqrt() { const result = Q_rsqrt._Z7Q_r...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/wasm-explorer-examples-sync/node_modules/env.js
test/cases/wasm/wasm-explorer-examples-sync/node_modules/env.js
export const _Z3powdd = Math.pow;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/unused-export/test.filter.js
test/cases/wasm/unused-export/test.filter.js
"use strict"; const supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); module.exports = () => supportsWebAssembly();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/unused-export/index.js
test/cases/wasm/unused-export/index.js
it("should allow wasm with unused exports", function() { return import("./module").then(function(module) { const result = module.run(); expect(result).toEqual(42); }); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/unused-export/module.js
test/cases/wasm/unused-export/module.js
import { getNumber } from "./wasm.wat"; export function run() { return getNumber(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/v128/test.filter.js
test/cases/wasm/v128/test.filter.js
"use strict"; // const supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); // const supportsFeature = require("webassembly-feature"); module.exports = () => // TODO fails with CompileError: WebAssembly.instantiate(): Compiling function #0 failed: memory instruction with no memory @+24 // return s...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/wasm/v128/index.js
test/cases/wasm/v128/index.js
it("should support wasm compiled with v128", function() { return import("./v128.wasm"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/entry-inline/no-var-leak-strict/index.js
test/cases/entry-inline/no-var-leak-strict/index.js
var localVar = 42; it("should not leak localVar to other modules", () => { expect(localVar).toBe(42); import(/* webpackMode: "eager" */ "./module").then(module => { expect(module.default).toBe("undefined"); }); }); export {};
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/entry-inline/no-var-leak-strict/module.js
test/cases/entry-inline/no-var-leak-strict/module.js
export default typeof localVar;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/entry-inline/no-var-leak/index.js
test/cases/entry-inline/no-var-leak/index.js
var localVar = 42; it("should not leak localVar to other modules", () => { expect(localVar).toBe(42); expect(require("./module")).toBe("undefined"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/entry-inline/no-var-leak/module.js
test/cases/entry-inline/no-var-leak/module.js
module.exports = typeof localVar;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-interop/non-existing-export/warnings.js
test/cases/cjs-interop/non-existing-export/warnings.js
"use strict"; module.exports = [ [ /export 'named' \(imported as 'named'\) was not found in '\.\/module' \(possible exports: default\)/ ], [ /export 'named' \(imported as 'named2'\) was not found in '\.\/esModule' \(possible exports: __esModule, default\)/ ] ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-interop/non-existing-export/index.js
test/cases/cjs-interop/non-existing-export/index.js
import { named } from "./module"; import { named as named2 } from "./esModule"; it("should emit errors", () => { expect(named).toBe(undefined); expect(named2).toBe(undefined); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-interop/non-existing-export/esModule.js
test/cases/cjs-interop/non-existing-export/esModule.js
Object.defineProperty(exports, "__esModule", { value: true }); exports.default = "default";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-interop/non-existing-export/module.js
test/cases/cjs-interop/non-existing-export/module.js
exports.default = "default";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/exports-default-bailout.js
test/cases/cjs-tree-shaking/exports/exports-default-bailout.js
class Test { getString() { return "hello"; } } const getExports = () => ({ default: Test }); module.exports = getExports();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/index.js
test/cases/cjs-tree-shaking/exports/index.js
it("should allow to export via exports", () => { expect(require("./assign-exports-property?1").abc).toBe("abc"); expect(require("./assign-exports-property?2")).toEqual({ abc: "abc", def: "def" }); }); it("should allow to export via module.exports", () => { expect(require("./assign-module-exports-property?1").a...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/assign-this-property.js
test/cases/cjs-tree-shaking/exports/assign-this-property.js
this.abc = "abc"; this.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/module-exports-default.js
test/cases/cjs-tree-shaking/exports/module-exports-default.js
class Test { getString() { return "hello"; } } module.exports.default = Test;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/assign-exports-property.js
test/cases/cjs-tree-shaking/exports/assign-exports-property.js
exports.abc = "abc"; exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/exports-default-flagged.js
test/cases/cjs-tree-shaking/exports/exports-default-flagged.js
Object.defineProperty(exports, "__esModule", { value: true }); class Test { getString() { return "hello"; } } exports.default = Test;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/reading-self-from-this.js
test/cases/cjs-tree-shaking/exports/reading-self-from-this.js
exports.abc = "abc"; exports.test = () => { return this.abc; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/define-module-exports-property.js
test/cases/cjs-tree-shaking/exports/define-module-exports-property.js
Object.defineProperty(module.exports, "abc", { enumerable: true, value: "abc" }); Object.defineProperty(module.exports, "def", { enumerable: true, value: "def" });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/require-default.js
test/cases/cjs-tree-shaking/exports/require-default.js
const ModuleExportsDefaultTest = require("./module-exports-default").default; const Test1 = require("./exports-default?1").default; import Test2 from "./exports-default?2"; const Test3 = require("./exports-default-flagged?3").default; import Test4 from "./exports-default-flagged?4"; const Test5 = require("./exports-def...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/attach-to-arrow-function.js
test/cases/cjs-tree-shaking/exports/attach-to-arrow-function.js
module.exports = () => "abc"; module.exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/reading-self-from-module-exports.js
test/cases/cjs-tree-shaking/exports/reading-self-from-module-exports.js
exports.abc = "abc"; exports.test = function() { return module.exports.abc; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/reading-self-from-exports.js
test/cases/cjs-tree-shaking/exports/reading-self-from-exports.js
exports.abc = "abc"; exports.test = function() { return exports.abc; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/exports-default-bailout-flagged.js
test/cases/cjs-tree-shaking/exports/exports-default-bailout-flagged.js
class Test { getString() { return "hello"; } } const getExports = () => ({ __esModule: true, default: Test }); module.exports = getExports();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/assign-module-exports-property.js
test/cases/cjs-tree-shaking/exports/assign-module-exports-property.js
module.exports.abc = "abc"; module.exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/attach-to-function.js
test/cases/cjs-tree-shaking/exports/attach-to-function.js
module.exports = function() { return "abc"; }; module.exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/attach-to-object.js
test/cases/cjs-tree-shaking/exports/attach-to-object.js
module.exports = { abc: "abc" }; module.exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/define-this-property.js
test/cases/cjs-tree-shaking/exports/define-this-property.js
Object.defineProperty(this, "abc", { enumerable: true, value: "abc" }); Object.defineProperty(this, "def", { enumerable: true, value: "def" });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/define-exports-property.js
test/cases/cjs-tree-shaking/exports/define-exports-property.js
Object.defineProperty(exports, "abc", { enumerable: true, value: "abc" }); Object.defineProperty(exports, "def", { enumerable: true, value: "def" });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/exports/exports-default.js
test/cases/cjs-tree-shaking/exports/exports-default.js
class Test { getString() { return "hello"; } } exports.default = Test;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/add-to-counter.js
test/cases/cjs-tree-shaking/reexports/add-to-counter.js
const counter = require("./counter"); counter.value++; exports.abc = 42; exports.abcUsed = __webpack_exports_info__.abc.used;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/reexport-property-exports.js
test/cases/cjs-tree-shaking/reexports/reexport-property-exports.js
exports.property1 = require("./module?pe1" + __resourceQuery).abc; var m2 = require("./module?pe2" + __resourceQuery); exports.property2 = m2.abc; this.property3 = require("./module?pe3" + __resourceQuery).abc; var m4 = require("./module?pe4" + __resourceQuery); this.property4 = m4.abc;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/reexport.js
test/cases/cjs-tree-shaking/reexports/reexport.js
module.exports = require("./" + __resourceQuery.slice(1));
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/reexport-reexport-module-exports.js
test/cases/cjs-tree-shaking/reexports/reexport-reexport-module-exports.js
var m2 = require("./reexport-whole-module-exports?x2" + __resourceQuery); module.exports = { reexport1: require("./reexport-whole-module-exports?x1" + __resourceQuery) .module1, reexport2: m2.module2 }; module.exports.reexport3 = require("./reexport-whole-module-exports?x3" + __resourceQuery).module3; var m4 = req...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/counter.js
test/cases/cjs-tree-shaking/reexports/counter.js
exports.value = 0;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/index.js
test/cases/cjs-tree-shaking/reexports/index.js
it("should allow to reexport a exports object (this, exports)", () => { expect(require("./reexport-whole-exports?1").module1.abc).toBe("abc"); expect(require("./reexport-whole-exports?2").module2.abc).toBe("abc"); expect(require("./reexport-whole-exports?3").module3.abc).toBe("abc"); expect(require("./reexport-whol...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/reexport-property-module-exports.js
test/cases/cjs-tree-shaking/reexports/reexport-property-module-exports.js
var m2 = require("./module?pme2" + __resourceQuery); module.exports = { property1: require("./module?pme1" + __resourceQuery).abc, property2: m2.abc }; module.exports.property3 = require("./module?pme3" + __resourceQuery).abc; var m4 = require("./module?pme4" + __resourceQuery); module.exports.property4 = m4.abc;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/reexport-reexport-exports.js
test/cases/cjs-tree-shaking/reexports/reexport-reexport-exports.js
exports.reexport1 = require("./reexport-whole-exports?x1" + __resourceQuery).module1; var m2 = require("./reexport-whole-exports?x2" + __resourceQuery); exports.reexport2 = m2.module2; this.reexport3 = require("./reexport-whole-exports?x3" + __resourceQuery).module3; var m4 = require("./reexport-whole-exports?x4" + _...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/reexport-whole-exports.js
test/cases/cjs-tree-shaking/reexports/reexport-whole-exports.js
exports.module1 = require("./module?we1" + __resourceQuery); var m2 = require("./module?we2" + __resourceQuery); exports.module2 = m2; this.module3 = require("./module?we3" + __resourceQuery); var m4 = require("./module?we4" + __resourceQuery); this.module4 = m4;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/module.js
test/cases/cjs-tree-shaking/reexports/module.js
exports.abc = "abc"; exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/reexports/reexport-whole-module-exports.js
test/cases/cjs-tree-shaking/reexports/reexport-whole-module-exports.js
var module2 = require("./module?wme2" + __resourceQuery); module.exports = { module1: require("./module?wme1" + __resourceQuery), module2 }; module.exports.module3 = require("./module?wme3" + __resourceQuery); var m4 = require("./module?wme4" + __resourceQuery); module.exports.module4 = m4;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/namespace/namespace-via-exports.js
test/cases/cjs-tree-shaking/namespace/namespace-via-exports.js
exports.__esModule = true; exports.abc = "abc"; exports.default = "default";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/namespace/index.js
test/cases/cjs-tree-shaking/namespace/index.js
it("should allow to create namespace exports via __esModule on exports", async () => { expect(await import("./namespace-via-exports")).toBe( require("./namespace-via-exports") ); }); it("should allow to create namespace exports via __esModule on literal", async () => { expect(await import("./namespace-via-literal"...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/namespace/namespace-via-define-properties.js
test/cases/cjs-tree-shaking/namespace/namespace-via-define-properties.js
Object.defineProperties(exports, { __esModule: { value: true }, abc: { enumerable: true, value: "abc" }, default: { enumerable: true, value: "default" } });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/namespace/namespace-via-define-property-minimized.js
test/cases/cjs-tree-shaking/namespace/namespace-via-define-property-minimized.js
Object.defineProperty(exports, "__esModule", { value: !0 }); exports.abc = "abc"; exports.default = "default";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/namespace/namespace-via-define-property.js
test/cases/cjs-tree-shaking/namespace/namespace-via-define-property.js
Object.defineProperty(exports, "__esModule", { value: true }); exports.abc = "abc"; exports.default = "default";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/namespace/namespace-via-literal.js
test/cases/cjs-tree-shaking/namespace/namespace-via-literal.js
module.exports = { __esModule: true, abc: "abc", default: "default" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/parsing/nested-require.js
test/cases/cjs-tree-shaking/parsing/nested-require.js
exports.value = require("./module").fn(require("./module").value);
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/parsing/index.js
test/cases/cjs-tree-shaking/parsing/index.js
it("should parse nested requires successfully", () => { expect(require("./nested-require").value).toBe(42); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/parsing/module.js
test/cases/cjs-tree-shaking/parsing/module.js
exports.fn = a => a + 1; exports.value = 41;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/cjs-to-esm/index.js
test/cases/cjs-tree-shaking/cjs-to-esm/index.js
it("should allow to require esm", () => { expect(require("./module?1").abc).toBe("abc"); expect(typeof require("./module?2").func).toBe("function"); // check if a function called with a namespace object as context // still yield the same optimization, compared to only accessing // the export expect(Object.keys(re...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/cjs-to-esm/module.js
test/cases/cjs-tree-shaking/cjs-to-esm/module.js
export const abc = "abc"; export const def = "def"; export const func = function() { "use strict"; return this; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/non-root-this/index.js
test/cases/cjs-tree-shaking/non-root-this/index.js
it("should not rewrite this nested in functions", () => { const f = require("./module").fff; expect(f.test1).toBe(true); expect(f.test2).toBe(true); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/non-root-this/module.js
test/cases/cjs-tree-shaking/non-root-this/module.js
function F() { this.test1 = true; Object.defineProperty(this, "test2", { value: true }); } exports.fff = new F();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/reading-this.js
test/cases/cjs-tree-shaking/bailouts/reading-this.js
exports.abc = "abc"; exports.test = () => { return this; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/define-module-property.js
test/cases/cjs-tree-shaking/bailouts/define-module-property.js
exports.abc = "abc"; Object.defineProperty(module, "exports", { value: { abc: "abc", def: "def" } });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/index.js
test/cases/cjs-tree-shaking/bailouts/index.js
it("should bailout when reading whole exports object from this", () => { var test = require("./reading-this").test; expect(test().abc).toBe("abc"); }); it("should bailout when reading whole exports object from exports", () => { var test = require("./reading-exports").test; expect(test().abc).toBe("abc"); }); it("...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/define-module-properties.js
test/cases/cjs-tree-shaking/bailouts/define-module-properties.js
exports.abc = "abc"; Object.defineProperties(module, { exports: { value: { abc: "abc", def: "def" } } });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/accessing-call-context.js
test/cases/cjs-tree-shaking/bailouts/accessing-call-context.js
module.exports.func = function f() { "use strict"; return this; }; module.exports.abc = "abc";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/reading-exports.js
test/cases/cjs-tree-shaking/bailouts/reading-exports.js
exports.abc = "abc"; exports.test = function() { return exports; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/assign-exports-assign.js
test/cases/cjs-tree-shaking/bailouts/assign-exports-assign.js
exports.abc = "abc"; var newObj = {}; exports = newObj; exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/accessing-module.js
test/cases/cjs-tree-shaking/bailouts/accessing-module.js
exports.abc = "abc"; function f(m) { m.exports = { abc: "abc", def: "def" }; } f(module);
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/reading-module-exports.js
test/cases/cjs-tree-shaking/bailouts/reading-module-exports.js
exports.abc = "abc"; exports.test = function() { return module.exports; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/using-amd.js
test/cases/cjs-tree-shaking/bailouts/using-amd.js
exports.abc = "not-abc"; define({ abc: "abc", def: "def" });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/assign-exports-define.js
test/cases/cjs-tree-shaking/bailouts/assign-exports-define.js
Object.defineProperty(exports, "abc", { value: "abc" }); var newObj = {}; exports = newObj; Object.defineProperty(exports, "def", { value: "def" });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/bailouts/nested-property.js
test/cases/cjs-tree-shaking/bailouts/nested-property.js
var abc = {}; module.exports = abc; module.exports.abc = "abc"; module.exports.def = "def"; expect(abc).toEqual({ abc: "abc", def: "def" });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/mjs/cjs-flagged.js
test/cases/cjs-tree-shaking/mjs/cjs-flagged.js
exports.__esModule = true; exports.abc = "abc"; exports.default = "default";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/mjs/index.js
test/cases/cjs-tree-shaking/mjs/index.js
import "./index.mjs"; import cjs from "./cjs.js?js"; import cjsFlagged from "./cjs-flagged.js?js"; import cjsDynamicYes from "./cjs-dynamic.js?js-yes"; import cjsDynamicNo from "./cjs-dynamic.js?js-no"; it("should return correct exports when default is imported", () => { expect(cjs).toEqual({ abc: "abc", default...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/mjs/cjs-dynamic.js
test/cases/cjs-tree-shaking/mjs/cjs-dynamic.js
exports.abc = "abc"; exports.default = "default"; const flagIt = () => (exports.__esModule = true); const query = __resourceQuery; if (query.includes("yes")) flagIt();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/mjs/cjs.js
test/cases/cjs-tree-shaking/mjs/cjs.js
exports.abc = "abc"; exports.default = "default";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/esm-to-cjs/index.js
test/cases/cjs-tree-shaking/esm-to-cjs/index.js
import m1 from "./module?1"; import m2 from "./module?2"; import { abc } from "./module?3"; it("should allow to import cjs with esm", () => { expect(m1.abc).toBe("abc"); expect(m2).toEqual({ abc: "abc", def: "def" }); expect(abc).toBe("abc"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/esm-to-cjs/module.js
test/cases/cjs-tree-shaking/esm-to-cjs/module.js
exports.abc = "abc"; exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/object-define-property-replace/index.js
test/cases/cjs-tree-shaking/object-define-property-replace/index.js
it("should replace Object.defineProperty correctly with brackets", () => { expect(require("./module").test).toBe(true); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/object-define-property-replace/module.js
test/cases/cjs-tree-shaking/object-define-property-replace/module.js
Object.defineProperty(((this)), "test", (((0, { value : true}))));
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/esModule-getter/index.js
test/cases/cjs-tree-shaking/esModule-getter/index.js
import def, { named, __esModule } from "./module"; import * as ns from "./module"; it("should allow to import module with getters", () => { expect(def).toBe("default"); expect(named).toBe("named"); expect(__esModule).toBe(true); expect(ns.default).toBe("default"); expect(ns.named).toBe("named"); expect(ns.__esMo...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/esModule-getter/module.js
test/cases/cjs-tree-shaking/esModule-getter/module.js
Object.defineProperty(exports, "__esModule", { get: () => true }); Object.defineProperty(exports, "default", { get: () => "default" }); Object.defineProperty(exports, "named", { get: () => "named" });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/weird-names/index.js
test/cases/cjs-tree-shaking/weird-names/index.js
import m from "./module"; it("should allow any name as exports in CommonJs", () => { expect(m.abc).toBe("abc"); expect(m[""]).toBe(""); expect(m["default"]).toBe("default"); expect(m["0"]).toBe("0"); expect(m[1]).toBe(1); expect(m.length).toBe("length"); expect(m["0_0"]).toBe("0_0"); expect(m.if).toBe("if"); ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/weird-names/module.js
test/cases/cjs-tree-shaking/weird-names/module.js
exports.abc = "abc"; exports[""] = ""; exports["default"] = "default"; exports["0"] = "0"; exports[1] = 1; exports.length = "length"; exports["0_0"] = "0_0"; exports.if = "if"; exports["\0"] = "\0"; exports["\n"] = "\n"; exports["*/"] = "*/"; exports["a.b.c"] = "a.b.c";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/transpiled/index.js
test/cases/cjs-tree-shaking/transpiled/index.js
it("should support typescript export *", () => { expect(require("./typescript-reexport").abc).toBe("abc"); }); it("should support babel default interop", () => { var xxx2 = _interopRequireDefault(require("./module?2")); var xxx3 = _interopRequireDefault(require("./module?3")); expect(xxx2.default.abc).toBe("abc");...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/transpiled/babel-default-interop.js
test/cases/cjs-tree-shaking/transpiled/babel-default-interop.js
var xxx = _interopRequireDefault(require("./module?2")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = xxx.default.abc;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/transpiled/typescript-reexport.js
test/cases/cjs-tree-shaking/transpiled/typescript-reexport.js
function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } __export(require("./module?1"));
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/transpiled/module.js
test/cases/cjs-tree-shaking/transpiled/module.js
exports.abc = "abc"; exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/objects/direct-object.js
test/cases/cjs-tree-shaking/objects/direct-object.js
module.exports = { abc: "abc", def: "def" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/objects/index.js
test/cases/cjs-tree-shaking/objects/index.js
it("should be able to export an object literal", () => { expect(require("./direct-object?1").abc).toBe("abc"); expect(require("./direct-object?2")).toEqual({ abc: "abc", def: "def" }); }); it("should be able to export an object literal indirect", () => { expect(require("./indirect-object?1").abc).toBe("abc"); expe...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/objects/indirect-object.js
test/cases/cjs-tree-shaking/objects/indirect-object.js
var value = { abc: "abc", def: "def" }; module.exports = value;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/importing/index.js
test/cases/cjs-tree-shaking/importing/index.js
it("should be able to import a module via require and property", () => { expect(require("./module").abc).toBe("abc"); }); it("should be able to import a module via require and destruct", () => { var { abc } = require("./module"); expect(abc).toBe("abc"); }); it("should be able to import a module via require and ex...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/importing/module.js
test/cases/cjs-tree-shaking/importing/module.js
exports.abc = "abc"; exports.def = "def";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/cases/cjs-tree-shaking/mutate/warnings.js
test/cases/cjs-tree-shaking/mutate/warnings.js
"use strict"; module.exports = [ [/export 'a' \(imported as 'a'\) was not found/], [/export 'a' \(imported as 'a'\) was not found/] ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false