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/worker/self-import/warnings.js
test/configCases/worker/self-import/warnings.js
"use strict"; module.exports = [ /This prevents using hashes of each other and should be avoided/, /This prevents using hashes of each other and should be avoided/, /This prevents using hashes of each other and should be avoided/, /This prevents using hashes of each other and should be avoided/ ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/self-import/index.js
test/configCases/worker/self-import/index.js
const isMain = typeof window !== "undefined"; if (isMain) { it("should allow to import itself", async () => { const worker = new Worker(import.meta.url); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.onmessage = event => { resolve(event.data); }; }); expect(result)...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/self-import/test.config.js
test/configCases/worker/self-import/test.config.js
"use strict"; module.exports = { findBundle(i) { switch (i) { case 0: return [`bundle${i}.js`]; case 1: return [`runtime.bundle${i}.js`, `main.bundle${i}.js`]; case 2: return [`bundle${i}.mjs`]; case 3: return [`runtime.bundle${i}.mjs`, `main.bundle${i}.mjs`]; } } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/self-import/webpack.config.js
test/configCases/worker/self-import/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { target: "web" }, { output: { filename: "[name].bundle1.js" }, target: "web", optimization: { runtimeChunk: "single" } }, { target: "web", experiments: { outputModule: true } }, { target: "web", ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/self-import/module.js
test/configCases/worker/self-import/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/universal/test.filter.js
test/configCases/worker/universal/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/worker/universal/index.js
test/configCases/worker/universal/index.js
it("should allow to create a WebWorker", async () => { const worker = new Worker(new URL("./worker.js", import.meta.url), { type: "module" }); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.onmessage = event => { resolve(event.data); }; }); expect(result).toBe("data: OK, t...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/universal/test.config.js
test/configCases/worker/universal/test.config.js
"use strict"; module.exports = { moduleScope(scope, options) { if (options.name.includes("node")) { delete scope.window; delete scope.document; delete scope.self; } } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/universal/worker.js
test/configCases/worker/universal/worker.js
self.onmessage = async event => { const { upper } = await import("./module"); postMessage(`data: ${upper(event.data)}, thanks`); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/universal/webpack.config.js
test/configCases/worker/universal/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { name: "web", target: ["web", "node"], experiments: { outputModule: true } }, { name: "node", target: ["web", "node"], experiments: { outputModule: true } } ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/universal/module.js
test/configCases/worker/universal/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/worklet-asset-1.js
test/configCases/worker/worklet/worklet-asset-1.js
function test1() {}
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/worklet.js
test/configCases/worker/worklet/worklet.js
onmessage = async event => { const { upper } = await import("./module"); postMessage(`data: ${upper(event.data)}, thanks`); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/test.filter.js
test/configCases/worker/worklet/test.filter.js
"use strict"; const supportsOptionalChaining = require("../../../helpers/supportsOptionalChaining"); const supportsWorker = require("../../../helpers/supportsWorker"); module.exports = () => supportsWorker() && supportsOptionalChaining();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/index.js
test/configCases/worker/worklet/index.js
// This is a pseudo-worklet, it is not a real worklet, but it is used to test the worker logic. // Real worklets do not have this API. it("should allow to create a paintWorklet worklet", async () => { let pseudoWorklet = await CSS.paintWorklet.addModule(new URL("./worklet.js", import.meta.url)); pseudoWorklet = new...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/test.config.js
test/configCases/worker/worklet/test.config.js
"use strict"; let outputDirectory; module.exports = { moduleScope(scope) { const FakeWorker = require("../../../helpers/createFakeWorker")({ outputDirectory }); // Pseudo code scope.AudioContext = class AudioContext { constructor() { this.audioWorklet = { addModule: (url) => Promise.resolve(F...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/webpack.config.js
test/configCases/worker/worklet/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { assetModuleFilename: "asset-[name][ext]", filename: "[name].js" }, target: "web", module: { rules: [ { test: /\.[cm]?js$/, parser: { worker: [ "CSS.paintWorklet.addModule()", "CSS.layout...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/module.js
test/configCases/worker/worklet/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worklet/worklet-asset-2.js
test/configCases/worker/worklet/worklet-asset-2.js
function test2() {}
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/issue-17489/worklet.js
test/configCases/worker/issue-17489/worklet.js
onmessage = async event => { const { upper } = await import("./module"); postMessage(`data: ${upper(event.data)}, thanks`); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/issue-17489/test.filter.js
test/configCases/worker/issue-17489/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/worker/issue-17489/index.js
test/configCases/worker/issue-17489/index.js
let audioContext = null; it("should allow to create a paintWorklet worklet", async () => { if (audioContext === null) { audioContext = new AudioContext(); } let pseudoWorklet = await audioContext.audioWorklet.addModule(new URL("./worklet.js", import.meta.url)); pseudoWorklet = new pseudoWorklet(); expect(pse...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/issue-17489/test.config.js
test/configCases/worker/issue-17489/test.config.js
"use strict"; let outputDirectory; module.exports = { moduleScope(scope) { const FakeWorker = require("../../../helpers/createFakeWorker")({ outputDirectory }); // Pseudo code scope.AudioContext = class AudioContext { constructor() { this.audioWorklet = { addModule: (url) => Promise.resolve(F...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/issue-17489/webpack.config.js
test/configCases/worker/issue-17489/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { filename: "[name].js" }, optimization: { innerGraph: true }, target: "web", module: { rules: [ { test: /\.[cm]?js$/, parser: { worker: ["*audioContext.audioWorklet.addModule()", "..."] } } ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/issue-17489/module.js
test/configCases/worker/issue-17489/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-async-node/test.filter.js
test/configCases/worker/node-worker-async-node/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/worker/node-worker-async-node/index.js
test/configCases/worker/node-worker-async-node/index.js
import { Worker } from "worker_threads"; it("should support ESM worker chunks in Node.js", async () => { const worker = new Worker( new URL("./worker.js" + __resourceQuery, import.meta.url), { type: "module" } ); const promise = new Promise((resolve, reject) => { worker.on("message", resolve); worker....
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-async-node/chunk.js
test/configCases/worker/node-worker-async-node/chunk.js
export function getMessage(msg) { return msg + " from worker with ESM import"; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-async-node/test.config.js
test/configCases/worker/node-worker-async-node/test.config.js
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { findBundle() { return "./bundle.js"; }, afterExecute(options) { const workerCode = fs.readFileSync( path.resolve(options.output.path, "./worker_js.bundle.js"), "utf8" ); if (!/ReadFile \+ VM\.run chunk loading f...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-async-node/worker.js
test/configCases/worker/node-worker-async-node/worker.js
import { parentPort } from "worker_threads"; const { getMessage } = await import("./chunk.js"); parentPort.on("message", (msg) => { // Worker with ESM import parentPort.postMessage(getMessage(msg)); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-async-node/webpack.config.js
test/configCases/worker/node-worker-async-node/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "async-node14", entry: "./index.js", optimization: { chunkIds: "named" }, output: { filename: "bundle.js" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/ignore/test.filter.js
test/configCases/worker/ignore/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/worker/ignore/index.js
test/configCases/worker/ignore/index.js
import { Worker } from "worker_threads"; it("should allow to ignore worker construction", async () => { const worker = new Worker( /* webpackIgnore: true */ new URL("./worker.js", import.meta.url), { type: "module" } ); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.on("mess...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/ignore/test.config.js
test/configCases/worker/ignore/test.config.js
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { afterExecute(options) { const outputPath = options.output.path; const files = fs.readdirSync(outputPath); const expected = ["bundle0.js", "worker.mjs", "worker-worker.mjs"]; const intersection = expected.filter((value) ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/ignore/worker.js
test/configCases/worker/ignore/worker.js
import { parentPort } from "worker_threads"; function upper(str) { return str.toUpperCase(); } parentPort.on("message", async data => { parentPort.postMessage(`data: ${upper(data)}, thanks`); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/ignore/webpack.config.js
test/configCases/worker/ignore/webpack.config.js
"use strict"; const fs = require("fs"); const path = require("path"); /** @type {import("../../../../").Configuration} */ module.exports = { output: { assetModuleFilename: "worker-[name].mjs", environment: { nodePrefixForCoreModules: false } }, plugins: [ { apply(compiler) { compiler.hooks.compil...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/umd-worker/test.filter.js
test/configCases/worker/umd-worker/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/worker/umd-worker/index.js
test/configCases/worker/umd-worker/index.js
import * as lib from "library"; it("should work", () => { expect(lib.value).toBe("data: OK, thanks") });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/umd-worker/library.js
test/configCases/worker/umd-worker/library.js
let value; it("should allow to create a WebWorker", async () => { const worker = new Worker(new URL("./worker.js", import.meta.url), { type: "module" }); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.onmessage = event => { value = event.data; resolve(event.data); }; })...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/umd-worker/test.config.js
test/configCases/worker/umd-worker/test.config.js
"use strict"; module.exports = { moduleScope(scope) { delete scope.document.baseURI; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/umd-worker/worker.js
test/configCases/worker/umd-worker/worker.js
export function upper(str) { return str.toUpperCase(); } self.onmessage = async event => { postMessage(`data: ${upper(event.data)}, thanks`); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/umd-worker/webpack.config.js
test/configCases/worker/umd-worker/webpack.config.js
"use strict"; const path = require("path"); /** @type {(env: Env, options: TestOptions) => import("../../../../").Configuration[]} */ module.exports = (env, { testPath }) => [ { name: "library", entry: "./library.js", target: "web", output: { library: { name: "library", type: "umd" } } }, {...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/umd-worker/module.js
test/configCases/worker/umd-worker/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/custom-worker/test.filter.js
test/configCases/worker/custom-worker/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/worker/custom-worker/index.js
test/configCases/worker/custom-worker/index.js
import Worker from "web-worker"; it("should allow to create a WebWorker", async () => { const worker = new Worker(new URL("./worker.js", import.meta.url), { type: "module" }); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.onmessage = event => { resolve(event.data); }; });...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/custom-worker/test.config.js
test/configCases/worker/custom-worker/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/worker/custom-worker/worker.js
test/configCases/worker/custom-worker/worker.js
onmessage = async event => { const { upper } = await import("./module"); postMessage(`data: ${upper(event.data)}, thanks`); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/custom-worker/webpack.config.js
test/configCases/worker/custom-worker/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { filename: "[name].js" }, target: "web", module: { rules: [ { test: /\.[cm]?js$/, parser: { worker: ["default from web-worker", "..."] } } ] } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/custom-worker/module.js
test/configCases/worker/custom-worker/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/custom-worker/node_modules/web-worker.js
test/configCases/worker/custom-worker/node_modules/web-worker.js
export default Worker;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm/test.filter.js
test/configCases/worker/node-worker-esm/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/worker/node-worker-esm/index.js
test/configCases/worker/node-worker-esm/index.js
import { Worker } from "worker_threads"; it("should support ESM worker chunks in Node.js", async () => { const worker = new Worker( new URL("./worker.js" + __resourceQuery, import.meta.url), { type: "module" } ); const promise = new Promise((resolve, reject) => { worker.on("message", resolve); worker....
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm/chunk.js
test/configCases/worker/node-worker-esm/chunk.js
export function getMessage(msg) { return msg + " from worker with ESM import"; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm/test.config.js
test/configCases/worker/node-worker-esm/test.config.js
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { findBundle() { return "./bundle.mjs"; }, moduleScope(scope) { scope.URL = URL; }, afterExecute(options) { const workerCode = fs.readFileSync( path.resolve(options.output.path, "./worker_js.bundle.mjs"), "utf8" ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm/worker.js
test/configCases/worker/node-worker-esm/worker.js
import { parentPort } from "worker_threads"; const { getMessage } = await import("./chunk.js"); parentPort.on("message", (msg) => { // Worker with ESM import parentPort.postMessage(getMessage(msg)); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm/webpack.config.js
test/configCases/worker/node-worker-esm/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node14", entry: "./index.js", optimization: { chunkIds: "named" }, output: { module: true, filename: "bundle.mjs" }, experiments: { outputModule: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-named/test.filter.js
test/configCases/worker/node-worker-named/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/worker/node-worker-named/index.js
test/configCases/worker/node-worker-named/index.js
import { Worker } from "worker_threads"; it("should allow to create a WebWorker", async () => { const worker = new Worker(new URL("./worker.js", import.meta.url), { name: "MyWorker" }); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.on("message", data => { resolve(data); })...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-named/test.config.js
test/configCases/worker/node-worker-named/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/worker/node-worker-named/worker.js
test/configCases/worker/node-worker-named/worker.js
import { parentPort } from "worker_threads"; parentPort.on("message", async data => { const { upper } = await import("./module"); parentPort.postMessage(`data: ${upper(data)}, thanks`); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-named/webpack.config.js
test/configCases/worker/node-worker-named/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { filename: "[name].js", environment: { nodePrefixForCoreModules: false } } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-named/module.js
test/configCases/worker/node-worker-named/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-require/test.filter.js
test/configCases/worker/node-worker-require/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/worker/node-worker-require/index.js
test/configCases/worker/node-worker-require/index.js
import { Worker } from "worker_threads"; it("should support ESM worker chunks in Node.js", async () => { const worker = new Worker( new URL("./worker.js" + __resourceQuery, import.meta.url), { type: "module" } ); const promise = new Promise((resolve, reject) => { worker.on("message", resolve); worker....
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-require/chunk.js
test/configCases/worker/node-worker-require/chunk.js
export function getMessage(msg) { return msg + " from worker with ESM import"; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-require/test.config.js
test/configCases/worker/node-worker-require/test.config.js
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { findBundle() { return "./bundle.js"; }, afterExecute(options) { const workerCode = fs.readFileSync( path.resolve(options.output.path, "./worker_js.bundle.js"), "utf8" ); if (!/require\(\) chunk loading for javas...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-require/worker.js
test/configCases/worker/node-worker-require/worker.js
import { parentPort } from "worker_threads"; const { getMessage } = await import("./chunk.js"); parentPort.on("message", (msg) => { // Worker with ESM import parentPort.postMessage(getMessage(msg)); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-require/webpack.config.js
test/configCases/worker/node-worker-require/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "async-node14", entry: "./index.js", optimization: { chunkIds: "named" }, output: { filename: "bundle.js", workerChunkLoading: "require" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-hmr/test.filter.js
test/configCases/worker/node-worker-hmr/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/worker/node-worker-hmr/index.js
test/configCases/worker/node-worker-hmr/index.js
import { Worker } from "worker_threads"; it("should allow to create a WebWorker", async () => { const worker = new Worker( new URL("./worker.js" + __resourceQuery, import.meta.url) ); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.on("message", data => { resolve(data); }); ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-hmr/test.config.js
test/configCases/worker/node-worker-hmr/test.config.js
"use strict"; module.exports = { findBundle() { return ["a.js", "b.js", "c.js", "d.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-hmr/worker.js
test/configCases/worker/node-worker-hmr/worker.js
import { parentPort } from "worker_threads"; parentPort.on("message", async data => { const { upper } = await import("./module"); parentPort.postMessage(`data: ${upper(data)}, thanks`); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-hmr/webpack.config.js
test/configCases/worker/node-worker-hmr/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { entry: { a: { import: "./index.js?a", filename: "[name].js" }, b: { import: "./index.js?b", filename: "[name].js" }, c: { import: "./index.js?c", filename: "[name].js" }, d: { import:...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-hmr/module.js
test/configCases/worker/node-worker-hmr/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm-class-worker/test.filter.js
test/configCases/worker/node-worker-esm-class-worker/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/worker/node-worker-esm-class-worker/index.js
test/configCases/worker/node-worker-esm-class-worker/index.js
import { Worker } from "worker_threads"; it("should support class worker chunk in Node.js", async () => { const worker = new Worker(new URL("./worker.js" + __resourceQuery, import.meta.url)); const promise = new Promise((resolve, reject) => { worker.on("message", resolve); worker.on("error", reject); }); wor...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm-class-worker/chunk.js
test/configCases/worker/node-worker-esm-class-worker/chunk.js
export function getMessage(msg) { return msg + " from worker with ESM import"; }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm-class-worker/test.config.js
test/configCases/worker/node-worker-esm-class-worker/test.config.js
"use strict"; module.exports = { findBundle() { return "./bundle.mjs"; }, moduleScope(scope) { scope.URL = URL; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm-class-worker/worker.js
test/configCases/worker/node-worker-esm-class-worker/worker.js
const { parentPort } = require("worker_threads"); const { getMessage } = require("./chunk.js"); parentPort.on("message", (msg) => { // Worker with ESM import parentPort.postMessage(getMessage(msg)); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/node-worker-esm-class-worker/webpack.config.js
test/configCases/worker/node-worker-esm-class-worker/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node14", entry: "./index.js", optimization: { chunkIds: "named" }, output: { module: true, filename: "bundle.mjs" }, experiments: { outputModule: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worker-self-reference-global/test.filter.js
test/configCases/worker/worker-self-reference-global/test.filter.js
"use strict"; module.exports = () => typeof Worker !== "undefined";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worker-self-reference-global/cjs-module.js
test/configCases/worker/worker-self-reference-global/cjs-module.js
// CommonJS module with self-reference dependency // Reading exports.value inside getValue creates a CommonJsSelfReferenceDependency exports.value = 42; exports.getValue = function() { // This line reads from exports, creating a self-reference return exports.value; }; // Also test module.exports self-reference module...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worker-self-reference-global/index.js
test/configCases/worker/worker-self-reference-global/index.js
it("should allow worker to import CJS module with self-reference when usedExports is global", async () => { const worker = new Worker(new URL("./worker.js", import.meta.url), { type: "module" }); worker.postMessage("test"); const result = await new Promise(resolve => { worker.onmessage = event => { resolve(e...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worker-self-reference-global/worker.js
test/configCases/worker/worker-self-reference-global/worker.js
const cjs = require("./cjs-module"); onmessage = event => { postMessage({ value: cjs.getValue() }); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/worker-self-reference-global/webpack.config.js
test/configCases/worker/worker-self-reference-global/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { filename: "[name].js" }, target: "web", optimization: { usedExports: "global" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/web-worker/test.filter.js
test/configCases/worker/web-worker/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/worker/web-worker/index.js
test/configCases/worker/web-worker/index.js
it("should allow to create a WebWorker", async () => { const worker = new Worker(new URL("./worker.js", import.meta.url), { type: "module" }); worker.postMessage("ok"); const result = await new Promise(resolve => { worker.onmessage = event => { resolve(event.data); }; }); expect(result).toBe("data: OK, t...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/web-worker/test.config.js
test/configCases/worker/web-worker/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/worker/web-worker/worker.js
test/configCases/worker/web-worker/worker.js
onmessage = async event => { const { upper } = await import("./module"); postMessage(`data: ${upper(event.data)}, thanks`); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/web-worker/webpack.config.js
test/configCases/worker/web-worker/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { filename: "[name].js" }, target: "web" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/worker/web-worker/module.js
test/configCases/worker/web-worker/module.js
export function upper(str) { return str.toUpperCase(); }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/amd/disabled/index.js
test/configCases/amd/disabled/index.js
it("should compile", function(done) { done(); }); it("should disable define", function(done) { expect(typeof define).toBe('undefined') done() })
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/amd/disabled/webpack.config.js
test/configCases/amd/disabled/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { amd: false };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/chunk-index/recalc-index/dynamic.js
test/configCases/chunk-index/recalc-index/dynamic.js
import './b.css' import './a.css'
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/chunk-index/recalc-index/index.js
test/configCases/chunk-index/recalc-index/index.js
it('should compile', async () => { await import(/* webpackChunkName: 'dynamic' */ './dynamic') })
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/chunk-index/recalc-index/webpack.config.js
test/configCases/chunk-index/recalc-index/webpack.config.js
"use strict"; /** @typedef {import("../../../../types").Compilation} Compilation */ /** @typedef {import("../../../../types").Module} Module */ /** @type {import("../../../../types").Configuration} */ module.exports = { entry: { main: "./index.js" }, experiments: { css: true }, plugins: [ function apply() {...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/chunk-index/issue-18008/A.js
test/configCases/chunk-index/issue-18008/A.js
import './m.css' export default import(/* webpackChunkName: 'shared' */ './shared')
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/chunk-index/issue-18008/main.js
test/configCases/chunk-index/issue-18008/main.js
it('should compile', async () => { await (await import(/* webpackChunkName: 'A' */ './A')).default await (await import(/* webpackChunkName: 'B' */ './B')).default })
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/chunk-index/issue-18008/test.config.js
test/configCases/chunk-index/issue-18008/test.config.js
"use strict"; module.exports = { findBundle() { return ["main.js", "A.js", "shared.js", "B.js", "B-2.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/chunk-index/issue-18008/B.js
test/configCases/chunk-index/issue-18008/B.js
export default import(/* webpackChunkName: 'B-2' */ './B-2')
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false