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/configCases/node/issue-18409/test.config.js
test/configCases/node/issue-18409/test.config.js
"use strict"; module.exports = { findBundle() { return ["./main.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409/common.js
test/configCases/node/issue-18409/common.js
export default "common";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409/webpack.config.js
test/configCases/node/issue-18409/webpack.config.js
"use strict"; /** @type {import("../../../../types").Configuration} */ module.exports = () => ({ devtool: false, mode: "development", entry: { main: { import: "./index.js", dependOn: "shared" }, shared: "./common.js" }, output: { filename: "[name].js" }, target: ["node"], optimization: { minimi...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409/separate.js
test/configCases/node/issue-18409/separate.js
export default "separate";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-ignore/index.js
test/configCases/parsing/require-ignore/index.js
const fs = require("fs"); const path = require("path"); it("should be able to ignore require()", () => { const source = fs.readFileSync(path.join(__dirname, "bundle1.js"), "utf-8"); expect(source).toMatch(`require(/* webpackIgnore: true */ "./other2.js")`); expect(source).not.toMatch(`require(/* webpackIgnore: fals...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-ignore/other.js
test/configCases/parsing/require-ignore/other.js
require(/* webpackIgnore: true */ "./other2.js"); require(/* webpackIgnore: false */ "./other3.js");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-ignore/webpack.config.js
test/configCases/parsing/require-ignore/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { entry: { bundle0: "./index.js", bundle1: "./other.js" }, module: { parser: { javascript: { commonjsMagicComments: true } } }, output: { filename: "[name].js" }, node: { __dirname: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-ignore/other3.js
test/configCases/parsing/require-ignore/other3.js
export default "other3";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-ignore/other2.js
test/configCases/parsing/require-ignore/other2.js
export default "other2";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-2942/warnings.js
test/configCases/parsing/issue-2942/warnings.js
"use strict"; module.exports = [ [/System.register is not supported by webpack/], [/System.get is not supported by webpack/], [/System.set is not supported by webpack/] ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-2942/index.js
test/configCases/parsing/issue-2942/index.js
it("should polyfill System", function() { if (typeof System === "object" && typeof System.register === "function") { require("fail"); } expect((typeof System)).toBe("object"); expect((typeof System.register)).toBe("undefined"); expect((typeof System.get)).toBe("undefined"); expect((typeof System.set)).toBe("und...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-2942/webpack.config.js
test/configCases/parsing/issue-2942/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { module: { rules: [ { test: /\.js$/, parser: { system: true } } ] } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/system.import/warnings.js
test/configCases/parsing/system.import/warnings.js
"use strict"; module.exports = [ [{compilerPath: /system_true/}, /System\.import\(\) is deprecated/] ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/system.import/index.js
test/configCases/parsing/system.import/index.js
it("should answer typeof System correctly", () => { if(__SYSTEM__) { expect((typeof System)).toBe("object"); } else { expect((typeof System)).toBe("undefined"); } }); it("should answer typeof System.import correctly", () => { if(__SYSTEM__) { expect((typeof System.import)).toBe("function"); } else { expec...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/system.import/webpack.config.js
test/configCases/parsing/system.import/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** * @param {boolean | undefined} system system * @returns {import("../../../../").Configuration} configuration */ function createConfig(system) { const systemString = "" + system; return { name: `system_${systemString}`, module: { rules: [ { ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/system.import/module.js
test/configCases/parsing/system.import/module.js
export default "ok";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/destructuring-computed-property/index.js
test/configCases/parsing/destructuring-computed-property/index.js
import * as namespace from "../destructuring-namespace-import/module"; it("should work with destructuring", function() { const key = "fo" + "o"; const { [key]: a = "foo", ["fo" + "o"]: a1 = "foo", [PROPERTY]: a2 = "foo", ["unkn" + "own"]: unknown = "foo", unknown1 = "foo", } = namespace; expect(a).toBe(...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/destructuring-computed-property/webpack.config.js
test/configCases/parsing/destructuring-computed-property/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { concatenateModules: true }, plugins: [ new webpack.DefinePlugin({ PROPERTY: JSON.stringify("foo") }) ] };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/destructuring-computed-property/module.js
test/configCases/parsing/destructuring-computed-property/module.js
export const foo = 'bar';
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/test.filter.js
test/configCases/parsing/top-level-declarations/test.filter.js
"use strict"; const supportsWorker = require("../../../helpers/supportsWorker"); module.exports = () => supportsWorker();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/index.js
test/configCases/parsing/top-level-declarations/index.js
import { a } from "./a"; import { createRequire } from "module"; const myRequire = createRequire(import.meta.url); const { b } = myRequire("./b"); const c = new URL("./c.js", import.meta.url); const audioContext = new AudioContext(); const d = audioContext.audioWorklet.addModule(new URL("./d.js", import.meta.url)); i...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/b.js
test/configCases/parsing/top-level-declarations/b.js
exports.b = 2;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/test.config.js
test/configCases/parsing/top-level-declarations/test.config.js
"use strict"; let outputDirectory; module.exports = { moduleScope(scope) { const FakeWorker = require("../../../helpers/createFakeWorker")({ outputDirectory }); scope.AudioContext = class AudioContext { constructor() { this.audioWorklet = { addModule: (url) => Promise.resolve(FakeWorker.bind(nu...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/d.js
test/configCases/parsing/top-level-declarations/d.js
export const d = 4;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/webpack.config.js
test/configCases/parsing/top-level-declarations/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", output: { filename: "[name].js" }, module: { parser: { javascript: { createRequire: true, worker: ["*audioContext.audioWorklet.addModule()"] } } }, plugins: [ function testPlugin(compiler) { ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/c.js
test/configCases/parsing/top-level-declarations/c.js
export const c = 3;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/top-level-declarations/a.js
test/configCases/parsing/top-level-declarations/a.js
export const a = 1;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-19514/index.js
test/configCases/parsing/issue-19514/index.js
it("should compile and work", done => { function main() { if (!import.meta.webpackHot) { return; } if (import.meta.webpackHot.status() !== "idle") { console.log("idle"); } } main(); done(); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-19514/webpack.config.js
test/configCases/parsing/issue-19514/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node", output: { library: { type: "commonjs" } }, optimization: { minimize: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/requirejs/index.js
test/configCases/parsing/requirejs/index.js
it("should ignore require.config", function() { require.config({ }); requirejs.config({ }); }); it("should have a require.version", function() { expect(require.version).toBeTypeOf("string"); }); it("should have a requirejs.onError function", function(done) { function f(){} expect(requirejs.onError).toBeTypeOf(...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/requirejs/webpack.config.js
test/configCases/parsing/requirejs/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { module: { rules: [ { test: /\.js$/, parser: { requireJs: true } } ] } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/requirejs/file.js
test/configCases/parsing/requirejs/file.js
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/optional/warnings.js
test/configCases/parsing/optional/warnings.js
"use strict"; module.exports = [ [ /Module not found/, /Can't resolve '\.\/not-existing' /, { details: /not-existing\.js/ } ] ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/optional/index.js
test/configCases/parsing/optional/index.js
it("should not fail for optional modules with bail", () => { let error; try { require("./not-existing"); } catch (e) { error = e; } expect(() => { throw error; }).toThrow(); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/optional/webpack.config.js
test/configCases/parsing/optional/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { bail: true };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-9156/index.js
test/configCases/parsing/issue-9156/index.js
it("should allow to access module.id when node option is set to false", function() { expect(module.id).toBeDefined(); }); it("should allow to access module.loaded when node option is set to false", function() { expect(module.loaded).toBeDefined(); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-9156/webpack.config.js
test/configCases/parsing/issue-9156/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", node: false };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/override-strict/strict.js
test/configCases/parsing/override-strict/strict.js
import "./non-strict" import fs from "fs"; it("should not have iife for entry module when modules strict is different", () => { const code = fs.readFileSync(__filename, 'utf-8'); const iifeComment = ["This entry needs to be wrapped in an IIFE", "because it needs to be in strict mode."].join(' '); expect(code).no...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/override-strict/non-strict.js
test/configCases/parsing/override-strict/non-strict.js
var a = 1; a.toString();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/override-strict/webpack.config.js
test/configCases/parsing/override-strict/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = [ { mode: "production", entry: ["./strict"], module: { parser: { javascript: { overrideStrict: "strict" } } } }, { mode: "production", entry: ["./strict"], module: { parser: { javascript: { ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/node-stuff-plugin-off/index.js
test/configCases/parsing/node-stuff-plugin-off/index.js
it("should not evaluate __dirname or __filename when node option is false", function(done) { if (typeof __dirname !== "undefined") { done.fail(); } if (typeof __filename !== "undefined") { done.fail(); } done(); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/node-stuff-plugin-off/test.config.js
test/configCases/parsing/node-stuff-plugin-off/test.config.js
"use strict"; module.exports = { moduleScope(scope) { delete scope.__dirname; delete scope.__filename; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/node-stuff-plugin-off/webpack.config.js
test/configCases/parsing/node-stuff-plugin-off/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", node: false };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-14545/index.js
test/configCases/parsing/issue-14545/index.js
it("should generate valid code when 'require' encounters object shorthand syntax", function() { expect(require("./module").obj.require).toEqual(require("./module").obj.r); expect(require("./module").obj.require).toBeTypeOf("function"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-14545/webpack.config.js
test/configCases/parsing/issue-14545/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { module: { unknownContextRegExp: /^\.\//, unknownContextCritical: false, exprContextRegExp: /^\.\//, exprContextCritical: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-14545/module.js
test/configCases/parsing/issue-14545/module.js
export const obj = {require, r: require}
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-main/index.js
test/configCases/parsing/require-main/index.js
const { main } = require("./module"); it("should handle require.main", async () => { expect(require.main === module).toBe(true); expect(main).toBe(false); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-main/webpack.config.js
test/configCases/parsing/require-main/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node", optimization: { concatenateModules: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-main/module.js
test/configCases/parsing/require-main/module.js
const main = require.main === module; module.exports = { main };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-14720/index.js
test/configCases/parsing/issue-14720/index.js
it("should generate a chunk for a full require dependencies in require.ensure", done => { require.ensure([], () => { expect(require("./module").property).toBe(42); expect(__STATS__.chunks.length).toBe(2); done(); }); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-14720/webpack.config.js
test/configCases/parsing/issue-14720/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "production" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-14720/module.js
test/configCases/parsing/issue-14720/module.js
exports.property = 42;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/import.js
test/configCases/parsing/issue-8293/import.js
import(`./${CONST_PREFIX0}/${DEFINED_EXPRESSION}/${CONST_SUFFIX0}`); import(window.baz ? `./${CONST_PREFIX1}/${DEFINED_EXPRESSION}/${CONST_SUFFIX1}` : `./${CONST_PREFIX2}/${DEFINED_EXPRESSION}/${CONST_SUFFIX2}`); import(typeof require === "function" ? `./${CONST_PREFIX3}/${DEFINED_EXPRESSION}/${CONST_SUFFIX3}` : ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/commonjs.js
test/configCases/parsing/issue-8293/commonjs.js
require(`./${CONST_PREFIX0}/${DEFINED_EXPRESSION}/${CONST_SUFFIX0}`); require(window.baz ? `./${CONST_PREFIX1}/${DEFINED_EXPRESSION}/${CONST_SUFFIX1}` : `./${CONST_PREFIX2}/${DEFINED_EXPRESSION}/${CONST_SUFFIX2}`); require(typeof require === "function" ? `./${CONST_PREFIX3}/${DEFINED_EXPRESSION}/${CONST_SUFFIX3}` :...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/index.js
test/configCases/parsing/issue-8293/index.js
const fs = require("fs"); const path = require("path"); ["import", "amd-require", "amd-define", "commonjs", "require.resolve"].forEach( method => { it(`should be able to replace ${method} param in DefinePlugin`, function() { const source = fs.readFileSync( path.join(__dirname, `bundle-${method}.js`), "ut...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/require.resolve.js
test/configCases/parsing/issue-8293/require.resolve.js
require.resolve(`./${CONST_PREFIX0}/${DEFINED_EXPRESSION}/${CONST_SUFFIX0}`); require.resolve( window.baz ? `./${CONST_PREFIX1}/${DEFINED_EXPRESSION}/${CONST_SUFFIX1}` : `./${CONST_PREFIX2}/${DEFINED_EXPRESSION}/${CONST_SUFFIX2}` ); require.resolve( typeof require === "function" ? `./${CONST_PREFIX3}/${DEFINED_...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/webpack.config.js
test/configCases/parsing/issue-8293/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { entry: { bundle0: "./index.js", "bundle-import": "./import.js", "bundle-amd-require": "./amd-define.js", "bundle-amd-define": "./amd-require.js", "bundle-commonjs": "./commonjs.js",...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/amd-define.js
test/configCases/parsing/issue-8293/amd-define.js
define([ `./${CONST_PREFIX0}/${DEFINED_EXPRESSION}/${CONST_SUFFIX0}`, window.baz ? `./${CONST_PREFIX1}/${DEFINED_EXPRESSION}/${CONST_SUFFIX1}` : `./${CONST_PREFIX2}/${DEFINED_EXPRESSION}/${CONST_SUFFIX2}`, typeof require === "function" ? `./${CONST_PREFIX3}/${DEFINED_EXPRESSION}/${CONST_SUFFIX3}` : `./${CONS...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/amd-require.js
test/configCases/parsing/issue-8293/amd-require.js
require([ `./${CONST_PREFIX0}/${DEFINED_EXPRESSION}/${CONST_SUFFIX0}`, window.baz ? `./${CONST_PREFIX1}/${DEFINED_EXPRESSION}/${CONST_SUFFIX1}` : `./${CONST_PREFIX2}/${DEFINED_EXPRESSION}/${CONST_SUFFIX2}`, typeof require === "function" ? `./${CONST_PREFIX3}/${DEFINED_EXPRESSION}/${CONST_SUFFIX3}` : `./${CON...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/prefix2/folder/suffix2.js
test/configCases/parsing/issue-8293/prefix2/folder/suffix2.js
export const test = 'test code 2';
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/prefix1/folder/suffix1.js
test/configCases/parsing/issue-8293/prefix1/folder/suffix1.js
export const test = 'test code 1';
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/prefix0/folder/suffix0.js
test/configCases/parsing/issue-8293/prefix0/folder/suffix0.js
export const test = 'test code 0';
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/prefix3/folder/suffix3.js
test/configCases/parsing/issue-8293/prefix3/folder/suffix3.js
export const test = 'test code 3';
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-8293/prefix4/folder/suffix4.js
test/configCases/parsing/issue-8293/prefix4/folder/suffix4.js
export const test = 'test code 4';
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/harmony-global/index.js
test/configCases/parsing/harmony-global/index.js
it("should be able to use global in a harmony module", function() { var x = require("./module1"); expect(x.default === global).toBeTruthy(); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/harmony-global/module1.js
test/configCases/parsing/harmony-global/module1.js
var freeGlobal = typeof global === "object" && global && global.Object === Object && global; export default freeGlobal;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/harmony-global/webpack.config.js
test/configCases/parsing/harmony-global/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", performance: { hints: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/harmony-global/module.js
test/configCases/parsing/harmony-global/module.js
export default 1;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/relative-filedirname/index.js
test/configCases/parsing/relative-filedirname/index.js
it("should define __dirname and __filename", function() { expect(__dirname).toBe(""); expect(__filename).toBe("index.js"); expect(require("./dir/file").dirname).toBe("dir"); expect(require("./dir/file").filename).toMatch(/^dir[\\\/]file.js$/); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/relative-filedirname/webpack.config.js
test/configCases/parsing/relative-filedirname/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { node: { __filename: true, __dirname: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/relative-filedirname/dir/file.js
test/configCases/parsing/relative-filedirname/dir/file.js
exports.filename = __filename; exports.dirname = __dirname;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination/esm1.js
test/configCases/parsing/dead-code-elimination/esm1.js
it("Should eliminate hoisted function in ESM because of default strict mode", () => { expect(() => { fnDecl; }).toThrow(); try { throw new Error(); } catch (e) { return; } { function fnDecl() { expect(true).toBe(true); } } expect(true).toBe(false); }); export default "esm1";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination/esm2.js
test/configCases/parsing/dead-code-elimination/esm2.js
export default "esm2";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination/index.js
test/configCases/parsing/dead-code-elimination/index.js
const esm1 = require("./esm1"); expect(esm1.default).toBe("esm1"); it("Shouldn't eliminate hoisted function in current block scope", () => { expect(() => { funcDecl; }).not.toThrow(); funcDecl(); if (true) return; function funcDecl() {} import("./esm3").then(() => { expect(true).toBe(false); }); }); it("...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination/test.js
test/configCases/parsing/dead-code-elimination/test.js
it("should work", () => { const stats = __STATS__.children[__STATS_I__]; expect( stats.modules.filter(m => m.name.startsWith("./esm")).length === 2 ).toBe(true); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination/test.config.js
test/configCases/parsing/dead-code-elimination/test.config.js
"use strict"; module.exports = { findBundle() { return ["test.js", "bundle0.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination/webpack.config.js
test/configCases/parsing/dead-code-elimination/webpack.config.js
"use strict"; const fs = require("fs"); const path = require("path"); const webpack = require("../../../../"); /** @type {import("../../../../").Configuration[]} */ module.exports = [ { optimization: { minimize: false }, module: { rules: [ { test: /index.js$/, type: "javascript/dynamic" ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination-require-ensure/index.js
test/configCases/parsing/dead-code-elimination-require-ensure/index.js
it("should compile and work", done => { require.ensure( ["./foo"], () => { throw new Error("error"); }, () => { import("./foo").then(m => { expect(m.default).toBe("foo"); done(); }); } ); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination-require-ensure/foo.js
test/configCases/parsing/dead-code-elimination-require-ensure/foo.js
export default "foo"
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/dead-code-elimination-require-ensure/webpack.config.js
test/configCases/parsing/dead-code-elimination-require-ensure/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { minimize: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/bom/index.js
test/configCases/parsing/bom/index.js
import * as mod from "./module.js"; import * as style from "./style.css"; import * as text1 from "./text-with-bom.txt"; import * as text2 from "./test-without-bom.text"; it("should remove BOM", async function() { const url = new URL("./resource-with-bom.ext", import.meta.url); expect(mod).toBeDefined(); expect(sty...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/bom/loader.js
test/configCases/parsing/bom/loader.js
/** @type {import("../../../../").LoaderDefinition} */ module.exports = function loader(content) { return `module.exports = ${JSON.stringify(content)}`; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/bom/test.config.js
test/configCases/parsing/bom/test.config.js
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { findBundle() { return ["dir_module_js.bundle0.js", "bundle0.js"]; }, afterExecute(options) { const outputPath = options.output.path; const files = fs.readdirSync(outputPath); for (const file of files) { const filen...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/bom/webpack.config.js
test/configCases/parsing/bom/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", output: { assetModuleFilename: "[name][ext]" }, optimization: { chunkIds: "named" }, module: { rules: [ { test: /\.txt$/, loader: require.resolve("./loader") }, { test: /\.text$/, ty...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/bom/module.js
test/configCases/parsing/bom/module.js
export default function test() { return 1; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/bom/dir/module.js
test/configCases/parsing/bom/dir/module.js
export default function test() { return 1; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-9042/index.js
test/configCases/parsing/issue-9042/index.js
it("should not evaluate __dirname or __filename when set to false", function(done) { if (typeof __dirname !== "undefined") { done.fail(); } if (typeof __filename !== "undefined") { done.fail(); } done(); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-9042/test.config.js
test/configCases/parsing/issue-9042/test.config.js
"use strict"; module.exports = { moduleScope(scope) { delete scope.__dirname; delete scope.__filename; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-9042/webpack.config.js
test/configCases/parsing/issue-9042/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", node: { __filename: false, __dirname: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-5624/index.js
test/configCases/parsing/issue-5624/index.js
import * as M from "./module"; it("should allow conditionals as callee", function() { var x = (true ? M.fn : M.fn)(); expect(x).toBe("ok"); }); it("should allow conditionals as object", function() { var x = (true ? M : M).fn(); expect(x).toBe("ok"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-5624/webpack.config.js
test/configCases/parsing/issue-5624/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { module: { strictThisContextOnImports: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-5624/module.js
test/configCases/parsing/issue-5624/module.js
export function fn() { return "ok"; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-4857/index.js
test/configCases/parsing/issue-4857/index.js
it("should transpile unreachable branches", () => { let count = 0; // BlockStatement if (true) { count++; } else { import("NOT_REACHABLE"); } if (false) { import("NOT_REACHABLE"); } else { count++; } // ExpressionStatement if (true) count++; else import("NOT_REACHABLE"); if (false) import("NOT_REA...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/issue-4857/webpack.config.js
test/configCases/parsing/issue-4857/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { minimize: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require.main/index.js
test/configCases/parsing/require.main/index.js
it("should define require.main", function() { expect(require.main).toBe(module); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require.main/webpack.config.js
test/configCases/parsing/require.main/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = {};
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-resolve-ignore/index.js
test/configCases/parsing/require-resolve-ignore/index.js
const fs = require("fs"); const path = require("path"); it("should be able to ignore require.resolve()", () => { const source = fs.readFileSync(path.join(__dirname, "bundle1.js"), "utf-8"); expect(source).toMatch(`require.resolve(/* webpackIgnore: true */ "./non-exists")`); expect(source).toMatch(`createRequire(imp...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-resolve-ignore/other.js
test/configCases/parsing/require-resolve-ignore/other.js
import { createRequire } from 'node:module'; const resolve = require.resolve(/* webpackIgnore: true */ "./non-exists"); const createRequireResolve1 = createRequire(import.meta.url).resolve(/* webpackIgnore: true */ "./non-exists"); const require = createRequire(import.meta.url); const createRequireResolve2 = require.r...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/require-resolve-ignore/webpack.config.js
test/configCases/parsing/require-resolve-ignore/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { entry: { bundle0: "./index.js", bundle1: "./other.js" }, module: { parser: { javascript: { commonjsMagicComments: true } } }, output: { filename: "[name].js" }, node: { __dirname: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/parsing/import-ignore/index.js
test/configCases/parsing/import-ignore/index.js
const fs = require("fs"); const path = require("path"); it("should be able to ignore import()", () => { const source = fs.readFileSync(path.join(__dirname, "bundle1.js"), "utf-8"); expect(source).toMatch(`import(/* webpackIgnore: true */ "./other2.js")`); expect(source).not.toMatch(`import(/* webpackIgnore: false *...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false