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/wasm/reference-types/index.js | test/configCases/wasm/reference-types/index.js | it("should work", function() {
return import("./pkg/wasm_lib.js").then(function(module) {
const cls = new module.Stuff();
expect(cls.refThing("my-str")).toBe("my-str");
});
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/reference-types/webpack.config.js | test/configCases/wasm/reference-types/webpack.config.js | "use strict";
/** @typedef {import("../../../../").Compiler} Compiler */
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
webassemblyModuleFilename: "[id].[hash].wasm"
},
experiments: {
asyncWebAssembly: true
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/reference-types/pkg/wasm_lib_bg.js | test/configCases/wasm/reference-types/pkg/wasm_lib_bg.js | let wasm;
export function __wbg_set_wasm(val) {
wasm = val;
}
let WASM_VECTOR_LEN = 0;
let cachedUint8ArrayMemory0 = null;
function getUint8ArrayMemory0() {
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/reference-types/pkg/wasm_lib.js | test/configCases/wasm/reference-types/pkg/wasm_lib.js | import * as wasm from "./wasm_lib_bg.wasm";
export * from "./wasm_lib_bg.js";
import { __wbg_set_wasm } from "./wasm_lib_bg.js";
__wbg_set_wasm(wasm);
wasm.__wbindgen_start();
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/bigints/test.filter.js | test/configCases/wasm/bigints/test.filter.js | "use strict";
const supports = require("webassembly-feature");
module.exports = () =>
// eslint-disable-next-line new-cap
supports["JS-BigInt-integration"]();
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/bigints/index.js | test/configCases/wasm/bigints/index.js | it("should allow converting i64s to JS bigints", async () => {
const { getI64 } = await import("./wasm.wat");
expect(getI64()).toEqual(42n);
});
it("should allow converting JS bigints to i64s", async () => {
const { takeI64 } = await import("./wasm.wat");
takeI64(42n);
})
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/bigints/webpack.config.js | test/configCases/wasm/bigints/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
entry: "./index",
module: {
rules: [
{
test: /\.wat$/,
loader: "wast-loader",
type: "webassembly/sync"
}
]
},
experiments: {
syncWebAssembly: true
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/fetch/test.filter.js | test/configCases/wasm/fetch/test.filter.js | "use strict";
const supportsResponse = require("../../../helpers/supportsResponse");
const supportsWebAssembly = require("../../../helpers/supportsWebAssembly");
module.exports = () => supportsWebAssembly() && supportsResponse();
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/fetch/index.js | test/configCases/wasm/fetch/index.js | it("should work", function() {
return import("./module").then(function(module) {
const result = module.run();
expect(result).toEqual(84);
});
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/fetch/test.config.js | test/configCases/wasm/fetch/test.config.js | "use strict";
const fs = require("fs");
const path = require("path");
const url = require("url");
module.exports = {
findBundle(i) {
switch (i) {
case 0:
return ["bundle0.mjs"];
case 1:
return ["chunks/93.async.js", "bundle1.js"];
case 2:
return ["bundle2.mjs"];
case 3:
return ["chunks/... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/fetch/webpack.config.js | test/configCases/wasm/fetch/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration[]} */
module.exports = [
{
target: "web",
module: {
rules: [
{
test: /\.wat$/,
loader: "wast-loader",
type: "webassembly/async"
}
]
},
output: {
module: true,
chunkFilename: "chunks/[name].async.mjs",
webassemb... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/fetch/module.js | test/configCases/wasm/fetch/module.js | import { getNumber } from "./wasm.wat?1";
import { getNumber as getNumber2 } from "./wasm.wat?2";
export function run() {
return getNumber() + getNumber2();
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/externref/test.filter.js | test/configCases/wasm/externref/test.filter.js | "use strict";
const supportsWebAssembly = require("../../../helpers/supportsWebAssembly");
module.exports = () => {
const [major] = process.versions.node.split(".").map(Number);
return major >= 18 && supportsWebAssembly();
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/externref/index.js | test/configCases/wasm/externref/index.js | it("should work", function() {
return import("./pkg/wasm_lib.js").then(function(module) {
expect(module.test("my-str")).toBe("my-str");
});
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/externref/webpack.config.js | test/configCases/wasm/externref/webpack.config.js | "use strict";
/** @typedef {import("../../../../").Compiler} Compiler */
/** @type {import("../../../../").Configuration} */
module.exports = {
output: {
webassemblyModuleFilename: "[id].[hash].wasm"
},
experiments: {
asyncWebAssembly: true
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/externref/pkg/wasm_lib_bg.js | test/configCases/wasm/externref/pkg/wasm_lib_bg.js | let wasm;
export function __wbg_set_wasm(val) {
wasm = val;
}
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
let cachedUint8ArrayMem... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/wasm/externref/pkg/wasm_lib.js | test/configCases/wasm/externref/pkg/wasm_lib.js | import * as wasm from "./wasm_lib_bg.wasm";
export * from "./wasm_lib_bg.js";
import { __wbg_set_wasm } from "./wasm_lib_bg.js";
__wbg_set_wasm(wasm);
wasm.__wbindgen_start();
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/utils/lazy-set/index.js | test/configCases/utils/lazy-set/index.js | it("should behave like a Set", () => {});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/utils/lazy-set/webpack.config.js | test/configCases/utils/lazy-set/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
plugins: [
(compiler) => {
compiler.hooks.done.tap("Test", ({ compilation }) => {
const items1 = [...compilation.fileDependencies];
const items2 = new Set(compilation.fileDependencies.keys());
const items3 = new Set(... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/module.exports/not-parsed-b.js | test/configCases/no-parse/module.exports/not-parsed-b.js | Object.defineProperty(module, "exports", {
get: function() {
return "ok";
}
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/module.exports/not-parsed-a.js | test/configCases/no-parse/module.exports/not-parsed-a.js | module.exports = "ok";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/module.exports/index.js | test/configCases/no-parse/module.exports/index.js | it("should correctly export stuff from not parsed modules", function() {
expect(require("./not-parsed-a")).toBe("ok");
expect(require("./not-parsed-b")).toBe("ok");
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/module.exports/webpack.config.js | test/configCases/no-parse/module.exports/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
module: {
noParse: /not-parsed/
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/no-parse-function/not-parsed-b.js | test/configCases/no-parse/no-parse-function/not-parsed-b.js | Object.defineProperty(module, "exports", {
get: function() {
return "ok";
}
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/no-parse-function/not-parsed-a.js | test/configCases/no-parse/no-parse-function/not-parsed-a.js | module.exports = "ok";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/no-parse-function/index.js | test/configCases/no-parse/no-parse-function/index.js | it("should correctly export stuff from not parsed modules", function() {
expect(require("./not-parsed-a")).toBe("ok");
expect(require("./not-parsed-b")).toBe("ok");
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/no-parse/no-parse-function/webpack.config.js | test/configCases/no-parse/no-parse-function/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
module: {
noParse(content) {
return /not-parsed/.test(content);
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/dynamic-module-layer.js | test/configCases/layer/rules/dynamic-module-layer.js | async function main(name) {
const { object: dynamicModuleObject } = await import(`./dynamic/${name}`);
return dynamicModuleObject;
}
export const object = {
name: 'module entry',
layer: __webpack_layer__,
modules: [
main('module1'),
main('module2'),
]
}; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/reexport.js | test/configCases/layer/rules/reexport.js | export * from "./module";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/index.js | test/configCases/layer/rules/index.js | import { object as direct } from "./module";
import { object as reexported } from "./reexport";
import { __loaderValue as entryLayerValue } from "./module";
import { external1 as entryLayerExternal1 } from "./module";
import { external2 as entryLayerExternal2 } from "./module";
import { direct as layerDirect } from ".... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/module-layer-change.js | test/configCases/layer/rules/module-layer-change.js | export { object as direct } from "./module";
export { object as reexported } from "./reexport";
export * from "./module";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/loader.js | test/configCases/layer/rules/loader.js | /** @type {import("../../../../").LoaderDefinition<{ value: any }>} */
module.exports = function (source) {
const options = this.getOptions();
return `${source}
;
export const __loaderValue = ${JSON.stringify(options.value)};`;
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/webpack.config.js | test/configCases/layer/rules/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
entry: {
bundle0: {
import: "./index.js",
layer: "entry-layer"
}
},
output: {
pathinfo: "verbose"
},
module: {
rules: [
{
test: /module-layer-change/,
layer: "layer"
},
{
test: /module-other-lay... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/module.js | test/configCases/layer/rules/module.js | export const object = {
layer: __webpack_layer__
};
export { default as external1 } from "external1";
export { default as external2 } from "external2";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/module-other-layer-change.js | test/configCases/layer/rules/module-other-layer-change.js | export { object as direct } from "./module";
export { object as reexported } from "./reexport";
export * from "./module";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/dynamic/module1.js | test/configCases/layer/rules/dynamic/module1.js | export const object = {
name: 'module1',
layer: __webpack_layer__,
}; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/rules/dynamic/module2.js | test/configCases/layer/rules/dynamic/module2.js | export const object = {
name: 'module2',
layer: __webpack_layer__
}; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/free.js | test/configCases/layer/define-multiple-entries/free.js | import * as module from "./modules/module.js";
import getGlobalThis from "./utils/get-global-this.js";
it("should contain a valid value", async function() {
expect(getGlobalThis()._COMMON).toBe(true);
expect(module.default).toBe("free");
const dyn = await import("./modules/dyn.js");
expect(dyn.default).toBe("dyn... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/test.config.js | test/configCases/layer/define-multiple-entries/test.config.js | "use strict";
module.exports = {
findBundle() {
return ["./common.js", "./free.js", "./paid.js"];
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/common.js | test/configCases/layer/define-multiple-entries/common.js | import * as module from "./modules/common.js";
import getGlobalThis from "./utils/get-global-this.js";
it("should contain a valid value", async function() {
expect(module.default).toBe("common");
const dyn = await import("./modules/common-dyn.js");
expect(dyn.default).toBe("common-dyn");
});
getGlobalThis()._COM... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/webpack.config.js | test/configCases/layer/define-multiple-entries/webpack.config.js | "use strict";
const { DefinePlugin } = require("../../../../");
/** @type {import("../../../../").Configuration} */
module.exports = {
entry: {
common: { import: "./common.js", filename: "common.js" },
paid: { dependOn: "common", import: "./paid.js", layer: "paid" },
free: { dependOn: "common", import: "./fre... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/paid.js | test/configCases/layer/define-multiple-entries/paid.js | import * as module from "./modules/module.js";
import getGlobalThis from "./utils/get-global-this.js";
it("should contain a valid value", async function() {
expect(getGlobalThis()._COMMON).toBe(true);
expect(module.default).toBe("paid");
const dyn = await import("./modules/dyn.js");
expect(dyn.default).toBe("dyn... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/utils/get-global-this.js | test/configCases/layer/define-multiple-entries/utils/get-global-this.js | export default function getGlobalThis() {
if (typeof globalThis === 'object') return globalThis;
try {
return this || new Function('return this')();
} catch (e) {
if (typeof window === 'object') return window;
}
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/modules/dyn.js | test/configCases/layer/define-multiple-entries/modules/dyn.js | export default "dyn";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/modules/common-dyn.js | test/configCases/layer/define-multiple-entries/modules/common-dyn.js | export default "common-dyn";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/modules/extra-dyn.js | test/configCases/layer/define-multiple-entries/modules/extra-dyn.js | export default "extra-dyn";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/modules/dyn-define.js | test/configCases/layer/define-multiple-entries/modules/dyn-define.js | export default FREE_VERSION ? "free" : "paid"
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-multiple-entries/modules/common.js | test/configCases/layer/define-multiple-entries/modules/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/layer/define-multiple-entries/modules/module.js | test/configCases/layer/define-multiple-entries/modules/module.js | const value = FREE_VERSION ? "free" : "paid";
export default value;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context-and-css/dark.js | test/configCases/layer/context-and-css/dark.js | require.context('./test1', true, /\.less$/);
require('./test2/shared.less');
it("should contain only black", function() {
const style = getComputedStyle(document.body);
expect(style["color-dark"]).toBe(" black");
expect(style["background-dark"]).toBe(" black");
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context-and-css/light.js | test/configCases/layer/context-and-css/light.js | require.context('./test1', true, /\.less$/);
require('./test2/shared.less');
it("should contain only white", function() {
const style = getComputedStyle(document.body);
expect(style["color-light"]).toBe(" white");
expect(style["background-light"]).toBe(" white");
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context-and-css/test.config.js | test/configCases/layer/context-and-css/test.config.js | "use strict";
module.exports = {
moduleScope(scope) {
const light = scope.window.document.createElement("link");
light.rel = "stylesheet";
light.href = "light.css";
scope.window.document.head.appendChild(light);
const dark = scope.window.document.createElement("link");
dark.rel = "stylesheet";
dark.href... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context-and-css/webpack.config.js | test/configCases/layer/context-and-css/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
target: "web",
entry: {
light: { import: "./light.js", layer: "light" },
dark: { import: "./dark.js", layer: "dark" }
},
experiments: {
css: true
},
optimization: {
runtimeChunk: "single"
},
output: {
filename: "[nam... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-single-entry/main.js | test/configCases/layer/define-single-entry/main.js | import * as module from "./modules/module.js";
it("should contain a valid value", async function() {
expect(module.default).toBe(FREE_VERSION ? "free" : "paid");
const dyn = await import("./modules/dyn.js");
expect(dyn.default).toBe("dyn");
const dynDefine = await import("./modules/dyn-define.js");
expect(dyn... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-single-entry/test.config.js | test/configCases/layer/define-single-entry/test.config.js | "use strict";
module.exports = {
findBundle() {
return ["./free.js", "./paid.js"];
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-single-entry/webpack.config.js | test/configCases/layer/define-single-entry/webpack.config.js | "use strict";
const { DefinePlugin } = require("../../../../");
/** @type {import("../../../../").Configuration} */
module.exports = {
entry: {
paid: { import: "./main.js", layer: "paid" },
free: { import: "./main.js", layer: "free" }
},
experiments: {
layers: true
},
optimization: {
splitChunks: {
ca... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-single-entry/modules/dyn.js | test/configCases/layer/define-single-entry/modules/dyn.js | export default "dyn";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-single-entry/modules/dyn-define.js | test/configCases/layer/define-single-entry/modules/dyn-define.js | export default FREE_VERSION ? "free" : "paid"
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/define-single-entry/modules/module.js | test/configCases/layer/define-single-entry/modules/module.js | const value = FREE_VERSION ? "free" : "paid";
export default value;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context/dark.js | test/configCases/layer/context/dark.js | require.context('./test1', true, /\.less$/);
require('./test2/shared.less');
it("should contain only black", function() {
const fs = require("fs");
const path = require("path");
const source = fs.readFileSync(path.join(__dirname, "dark.css"), "utf-8");
expect(source.match(/black/g)).toHaveLength(2);
expect(sour... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context/light.js | test/configCases/layer/context/light.js | require.context('./test1', true, /\.less$/);
require('./test2/shared.less');
it("should contain only white", function() {
const fs = require("fs");
const path = require("path");
const source = fs.readFileSync(path.join(__dirname, "light.css"), "utf-8");
expect(source.match(/white/g)).toHaveLength(2);
expect(sou... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context/test.config.js | test/configCases/layer/context/test.config.js | "use strict";
module.exports = {
findBundle() {
return ["./light.js", "./dark.js"];
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/layer/context/webpack.config.js | test/configCases/layer/context/webpack.config.js | "use strict";
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
/** @type {import("../../../../").Configuration} */
module.exports = {
entry: {
light: { import: "./light.js", layer: "light" },
dark: { import: "./dark.js", layer: "dark" }
},
output: {
filename: "[name].js"
},
plugins: [
new... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/virtual-url-plugin/ts-loader.js | test/configCases/plugins/virtual-url-plugin/ts-loader.js | /** @type {import("../../../../").LoaderDefinition} */
module.exports = function(source) {
const callback = this.async();
const withoutInterfaces = source.replace(/interface\s+\w+(\s*extends\s+\w+)?\s*\{[^}]*\}/g, '');
callback(null, withoutInterfaces);
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/virtual-url-plugin/index.js | test/configCases/plugins/virtual-url-plugin/index.js | import { routes } from "virtual:routes"
import { app } from "virtual:app"
import json from "virtual:config"
import { ts } from "virtual:ts"
import txt from "virtual:txt"
it("should correctly load virtual modules with the js type.", (done) => {
expect(typeof routes.bar).toBe("function");
expect(typeof routes.fo... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/virtual-url-plugin/webpack.config.js | test/configCases/plugins/virtual-url-plugin/webpack.config.js | "use strict";
const fs = require("fs");
const path = require("path");
const webpack = require("../../../../");
const { VirtualUrlPlugin } = webpack.experiments.schemes;
const watchDir = path.join(__dirname, "./routes");
/** @type {import("webpack").Configuration} */
const config = {
plugins: [
new VirtualUrlPlug... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/virtual-url-plugin/babel-loader.js | test/configCases/plugins/virtual-url-plugin/babel-loader.js | /** @typedef {import("webpack").LoaderContext<void>} LoaderContext */
/**
* @this {LoaderContext}
* @param {string} source The source code to process
* @returns {void}
*/
module.exports = function(source) {
const callback = this.async();
try {
const withoutConst = source.replace(/const/g, "var");
... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/virtual-url-plugin/routes/bar.js | test/configCases/plugins/virtual-url-plugin/routes/bar.js | export const bar = "bar"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/virtual-url-plugin/routes/foo.js | test/configCases/plugins/virtual-url-plugin/routes/foo.js | export const foo = "foo"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/source-map-dev-tool-plugin~append/index.js | test/configCases/plugins/source-map-dev-tool-plugin~append/index.js | it("should have [file] replaced with chunk filename in append", function() {
var fs = require("fs"),
path = require("path");
var source = fs.readFileSync(path.join(__dirname, "some-test.js"), "utf-8");
expect(source).toMatch("//# sourceMappingURL=http://localhost:50505/some-test.js.map");
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/source-map-dev-tool-plugin~append/test.js | test/configCases/plugins/source-map-dev-tool-plugin~append/test.js | var testObject = {
a: 1
};
module.exports = testObject;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/source-map-dev-tool-plugin~append/webpack.config.js | test/configCases/plugins/source-map-dev-tool-plugin~append/webpack.config.js | "use strict";
const TerserPlugin = require("terser-webpack-plugin");
const webpack = require("../../../../");
/** @type {import("../../../../").Configuration} */
module.exports = {
node: {
__dirname: false,
__filename: false
},
entry: {
bundle0: ["./index.js"],
"some-test": ["./test.js"]
},
output: {
f... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/min-chunk-size/index.js | test/configCases/plugins/min-chunk-size/index.js | it("should combine two chunk if too small", done => {
// b should not yet available
var bf = __webpack_modules__[require.resolveWeak("./b")];
expect((typeof bf)).toBe("undefined");
// load a
import("./a").then(a => {
expect(a.default).toBe("a");
// check if b is available too
var bf = __webpack_modules__[re... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/min-chunk-size/b.js | test/configCases/plugins/min-chunk-size/b.js | export default "b";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/min-chunk-size/webpack.config.js | test/configCases/plugins/min-chunk-size/webpack.config.js | "use strict";
const webpack = require("../../../../");
/** @type {import("../../../../").Configuration} */
module.exports = {
plugins: [
new webpack.optimize.MinChunkSizePlugin({
minChunkSize: 30
})
]
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/min-chunk-size/a.js | test/configCases/plugins/min-chunk-size/a.js | export default "a";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/progress-plugin/data.js | test/configCases/plugins/progress-plugin/data.js | module.exports = /** @type {string[]} */ ([]);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/progress-plugin/index.js | test/configCases/plugins/progress-plugin/index.js | it("should contain the custom progress messages", function () {
var data = require("data");
expect(data).toContain("sealing|optimizing");
expect(data).toContain("sealing|optimizing|CustomPlugin");
expect(data).toContain(
"sealing|optimizing|CustomPlugin|custom category|custom message"
);
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/progress-plugin/test.config.js | test/configCases/plugins/progress-plugin/test.config.js | "use strict";
const path = require("path");
module.exports = {
// sharing global require cache between webpack.config.js and testing file
modules: {
[path.resolve(__dirname, "data.js")]: require("./data")
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/progress-plugin/webpack.config.js | test/configCases/plugins/progress-plugin/webpack.config.js | "use strict";
const path = require("path");
const webpack = require("../../../../");
const data = require("./data");
/** @typedef {import("../../../../").ProgressPlugin} ProgressPlugin */
/** @type {import("../../../../").Configuration} */
module.exports = {
externals: {
data: `commonjs ${path.resolve(__dirname, ... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/define-plugin-process-env/index.js | test/configCases/plugins/define-plugin-process-env/index.js | it("destructuring should work with 'process.env'", function () {
expect(process.env.NODE_ENV).toBe("production");
const { NODE_ENV } = process.env;
expect(NODE_ENV).toBe("production");
const { NODE_ENV: RENAME_NODE_ENV } = process.env;
expect(RENAME_NODE_ENV).toBe("production");
const { NODE_ENV: OTHER_RENAME_... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/define-plugin-process-env/webpack.config.js | test/configCases/plugins/define-plugin-process-env/webpack.config.js | "use strict";
const DefinePlugin = require("../../../../").DefinePlugin;
/** @type {import("../../../../").Configuration} */
module.exports = {
target: "node",
mode: "production",
plugins: [
new DefinePlugin({
"process.env.ENVIRONMENT": JSON.stringify("node")
})
]
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin/index.js | test/configCases/plugins/banner-plugin/index.js | const fs = require("fs");
const path = require("path");
it("should contain banner in bundle0 chunk", () => {
const source = fs.readFileSync(__filename, "utf-8");
expect(source).toMatch("A test value");
expect(source).toMatch("banner is a string");
expect(source).toMatch("banner is a function");
expect(source).toM... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin/test.js | test/configCases/plugins/banner-plugin/test.js | var foo = {};
module.exports = foo;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin/webpack.config.js | test/configCases/plugins/banner-plugin/webpack.config.js | "use strict";
const webpack = require("../../../../");
/** @type {import("../../../../").Configuration} */
module.exports = {
node: {
__dirname: false,
__filename: false
},
entry: {
bundle0: ["./index.js"],
vendors: ["./vendors.js"]
},
output: {
filename: "[name].js"
},
plugins: [
new webpack.Banne... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin/vendors.js | test/configCases/plugins/banner-plugin/vendors.js | var bar = {};
module.exports = bar;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin-hashing/index.js | test/configCases/plugins/banner-plugin-hashing/index.js | const parseBanner = banner => {
return banner
.slice(4, -3)
.split(", ")
.map(n => n.split(":"))
.reduce((acc, val) => {
acc[val[0]] = val[1];
return acc;
}, {});
};
var source = require("fs")
.readFileSync(__filename, "utf-8")
.split("\n")
.slice(0, 1)[0];
const banner = parseBanner(source);
cons... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin-hashing/test.js | test/configCases/plugins/banner-plugin-hashing/test.js | var foo = {};
module.exports = foo;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin-hashing/test.config.js | test/configCases/plugins/banner-plugin-hashing/test.config.js | "use strict";
module.exports = {
findBundle() {
return "./dist/banner.js";
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin-hashing/webpack.config.js | test/configCases/plugins/banner-plugin-hashing/webpack.config.js | "use strict";
const webpack = require("../../../../");
/** @type {import("../../../../").Configuration} */
module.exports = {
node: {
__dirname: false,
__filename: false
},
entry: {
"dist/banner": ["./index.js"],
vendors: ["./vendors.js"]
},
output: {
filename: "[name].js?value"
},
plugins: [
new w... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/banner-plugin-hashing/vendors.js | test/configCases/plugins/banner-plugin-hashing/vendors.js | var bar = {};
module.exports = bar;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/define-plugin/index.js | test/configCases/plugins/define-plugin/index.js | function donotcallme() {
expect("asi unsafe call happened").toBe(false);
}
it("should define FALSE", function () {
expect(FALSE).toBe(false);
expect(typeof FALSE).toBe("boolean");
var x = require(FALSE ? "fail" : "./dir/a");
var y = FALSE ? require("fail") : require("./dir/a");
});
it("should define TRUE", functi... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/define-plugin/webpack.config.js | test/configCases/plugins/define-plugin/webpack.config.js | "use strict";
const DefinePlugin = require("../../../../").DefinePlugin;
const Module = require("../../../../").Module;
/** @type {import("../../../../").Configuration} */
module.exports = {
plugins: [
new DefinePlugin({
TRUE: true,
FALSE: false,
NULL: null,
UNDEFINED: undefined,
NUMBER: 100.05,
... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/define-plugin/dir/a.js | test/configCases/plugins/define-plugin/dir/a.js | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false | |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/mini-css-extract-plugin/b.js | test/configCases/plugins/mini-css-extract-plugin/b.js | import "./b.css";
const fs = __non_webpack_require__("fs");
const path = __non_webpack_require__("path");
it("b should load a chunk with css", () => {
const linkStart = document.getElementsByTagName("link").length;
const scriptStart = document.getElementsByTagName("script").length;
const promise = import("./chunk"... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/mini-css-extract-plugin/chunk.js | test/configCases/plugins/mini-css-extract-plugin/chunk.js | import "./chunk.css";
export default 42;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/mini-css-extract-plugin/test.config.js | test/configCases/plugins/mini-css-extract-plugin/test.config.js | "use strict";
module.exports = {
findBundle(i) {
return [`${i}_a.js`, `${i}_b.js`, `${i}_c.js`];
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/mini-css-extract-plugin/x.js | test/configCases/plugins/mini-css-extract-plugin/x.js | import(/* webpackExports: [] */ "./chunk");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/mini-css-extract-plugin/webpack.config.js | test/configCases/plugins/mini-css-extract-plugin/webpack.config.js | "use strict";
const MCEP = require("mini-css-extract-plugin");
/** @typedef {import("../../../../").StatsCompilation} StatsCompilation */
/** @type {(i: number, options?: import("mini-css-extract-plugin").PluginOptions) => import("../../../../").Configuration} */
const config = (i, options) => ({
entry: {
a: "./a... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/plugins/mini-css-extract-plugin/a.js | test/configCases/plugins/mini-css-extract-plugin/a.js | import "./a.css";
const fs = __non_webpack_require__("fs");
const path = __non_webpack_require__("path");
it("a should load a chunk with css", () => {
const linkStart = document.getElementsByTagName("link").length;
const scriptStart = document.getElementsByTagName("script").length;
const promise = import("./chunk"... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.