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/hotCases/numeric-ids/add-remove-chunks/chunk2.js | test/hotCases/numeric-ids/add-remove-chunks/chunk2.js | import { value as v } from "./file";
export const value = v + 0.5;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/numeric-ids/add-remove-chunks/file.js | test/hotCases/numeric-ids/add-remove-chunks/file.js | export var value = 1;
---
export var value = 1.5;
---
export var value = 3;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/numeric-ids/add-remove-chunks/module.js | test/hotCases/numeric-ids/add-remove-chunks/module.js | export default () => import(/* webpackChunkName: "1e1" */ "./chunk");
---
export default () => import(/* webpackChunkName: "10" */ "./chunk2");
---
export default () => import(/* webpackChunkName: "1e1" */ "./chunk");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/numeric-ids/production/index.js | test/hotCases/numeric-ids/production/index.js | import { value } from "./file";
it("should auto-import an ES6 imported value on accept", function(done) {
expect(value).toBe(1);
module.hot.accept("./file", function() {
expect(value).toBe(2);
outside();
done();
});
NEXT(require("../../update")(done));
});
function outside() {
expect(value).toBe(2);
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/numeric-ids/production/webpack.config.js | test/hotCases/numeric-ids/production/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
mode: "production",
optimization: {
minimize: false
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/numeric-ids/production/file.js | test/hotCases/numeric-ids/production/file.js | export var value = 1;
---
export var value = 2;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/conditional-runtime/accept-conditional/index.js | test/hotCases/conditional-runtime/accept-conditional/index.js | it("should create a conditional import when accepted", done => {
if (Math.random() < 0) new Worker(new URL("worker.js", import.meta.url));
import("./module")
.then(module =>
module.test(callback => {
NEXT(require("../../update")(done, undefined, callback));
}, done)
)
.catch(done);
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/conditional-runtime/accept-conditional/dep2.js | test/hotCases/conditional-runtime/accept-conditional/dep2.js | export default 42;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/conditional-runtime/accept-conditional/worker.js | test/hotCases/conditional-runtime/accept-conditional/worker.js | import { g } from "./shared";
expect(g()).toBe(42);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/conditional-runtime/accept-conditional/webpack.config.js | test/hotCases/conditional-runtime/accept-conditional/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
optimization: {
sideEffects: true,
usedExports: true,
innerGraph: true,
splitChunks: {
cacheGroups: {
forceMerge: {
test: /shared/,
enforce: true,
name: "shared",
chunks: "all"
}
}
}
},
m... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/conditional-runtime/accept-conditional/shared.js | test/hotCases/conditional-runtime/accept-conditional/shared.js | import x from "./dep1";
import y from "./dep2";
export function f() {
return x;
}
export function g() {
return y;
}
module.hot.accept(["./dep1", "./dep2"]);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/conditional-runtime/accept-conditional/module.js | test/hotCases/conditional-runtime/accept-conditional/module.js | import { f } from "./shared";
export function test(next, done) {
expect(f()).toBe(42);
next(() => {
expect(f()).toBe(43);
done();
});
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/conditional-runtime/accept-conditional/dep1.js | test/hotCases/conditional-runtime/accept-conditional/dep1.js | export default 42;
---
export default 43;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/hmr-download-manifest/cjs-chunk-loading/index.js | test/hotCases/hmr-download-manifest/cjs-chunk-loading/index.js | if (module.hot) {
module.hot.accept()
}
it('Should work', (done) => {
expect(1).toBe(1)
NEXT(
require("../../update")(done, true, () => {
done();
})
);
})
---
// https://github.com/webpack/webpack/pull/19832#event-19319802751
// This is because within the checkForUpdate(hot/s... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/hmr-download-manifest/module-chunk-loading/index.js | test/hotCases/hmr-download-manifest/module-chunk-loading/index.js | import update from "../../update.esm.js";
if (import.meta.webpackHot) {
import.meta.webpackHot.accept()
}
it('Should work', (done) => {
expect(1).toBe(1)
NEXT(
update(done, true, () => {
done();
})
);
})
---
// https://github.com/webpack/webpack/pull/19832#event-19319802751... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/hmr-download-manifest/module-chunk-loading/webpack.config.js | test/hotCases/hmr-download-manifest/module-chunk-loading/webpack.config.js | "use strict";
module.exports = {
experiments: {
outputModule: true
},
output: {
module: true,
library: {
type: "module"
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/define/issue-6962/index.js | test/hotCases/define/issue-6962/index.js | import "./module";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/define/issue-6962/webpack.config.js | test/hotCases/define/issue-6962/webpack.config.js | "use strict";
const webpack = require("../../../../");
/** @type {import("../../../../").Configuration} */
module.exports = {
plugins: [
new webpack.DefinePlugin({
DEFINE_PATH: JSON.stringify("./a")
})
]
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/define/issue-6962/module.js | test/hotCases/define/issue-6962/module.js | import value1 from "./a";
it("should have the expected static path defined", function () {
expect(DEFINE_PATH).toBe("./a");
});
it("should hot.accept the module located at the static file path without breaking the compiler", function () {
module.hot.accept("./a");
expect(value1).toBe(1);
});
it("should hot.accept... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/define/issue-6962/a.js | test/hotCases/define/issue-6962/a.js | export default 1;
module.hot.dispose(data => {
data.crash = true;
})
module.hot.accept(() => {
expect(DEFINE_PATH).toBe("./a");
module.hot.invalidate();
});
---
if (module.hot.data && module.hot.data.crash) throw new Error();
export default 2;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/asset-modules-source/source/index.js | test/hotCases/asset-modules-source/source/index.js | it("should regenerate contenthash", function(done) {
const value = new URL("./file.text", import.meta.url);
expect(/file\.7eff7665bf7fc2696232\.text/.test(value.toString())).toBe(true);
module.hot.accept("./file.text", function() {
const value = new URL("./file.text", import.meta.url);
expect(/file\.402033be7494... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/asset-modules-source/source/webpack.config.js | test/hotCases/asset-modules-source/source/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
mode: "development",
devtool: false,
optimization: {
realContentHash: true
},
module: {
generator: {
asset: {
filename: "assets/[name].[contenthash][ext]"
}
},
rules: [
{
test: /file\.text$/,
type: "a... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/asset-modules-source/lazy-compilation/index.js | test/hotCases/asset-modules-source/lazy-compilation/index.js | const getFile = name =>
__non_webpack_require__("fs").readFileSync(
__non_webpack_require__("path").join(__dirname, name),
"utf-8"
);
it("should work", async function (done) {
let promise = import("./file.text");
NEXT(
require("../../update")(done, true, () => {
promise.then(() => {
expect(getFile("./... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/asset-modules-source/lazy-compilation/webpack.config.js | test/hotCases/asset-modules-source/lazy-compilation/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
lazyCompilation: {
entries: false,
imports: true
}
},
node: {
__dirname: false
},
module: {
generator: {
asset: {
filename: "assets/[name][ext]"
}
},
rules: [
{
test: /file\.text$... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/this-in-accept/index.js | test/hotCases/code-generation/this-in-accept/index.js | import x from "./module";
it("should have correct this context in accept handler", (done) => {
expect(x).toEqual("ok1");
(function() {
module.hot.accept("./module", () => {
expect(x).toEqual("ok2");
expect(this).toEqual({ ok: true });
done();
});
}).call({ ... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/this-in-accept/module.js | test/hotCases/code-generation/this-in-accept/module.js | export default "ok1";
---
export default "ok2";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency/index.js | test/hotCases/code-generation/async-dependency/index.js | import update from "../../update";
import a from "./module";
it("should await an async dependency", (done) => {
expect(a).toEqual("a 1");
import.meta.webpackHot.accept("./module");
NEXT(update(done));
import.meta.webpackHot.addStatusHandler((status) => {
if (status === "idle") {
expect(a).toEqual("a 2");
... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency/module.js | test/hotCases/code-generation/async-dependency/module.js | export default await Promise.resolve("a 1");
---
export default await Promise.resolve("a 2");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-callback/index.js | test/hotCases/code-generation/async-dependency-callback/index.js | import update from "../../update";
import a from "./module";
it("should await an async dependency when callback is provided", (done) => {
expect(a).toEqual("a 1");
import.meta.webpackHot.accept("./module", () => {
expect(a).toEqual("a 2");
done();
});
NEXT(update(done));
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-callback/module.js | test/hotCases/code-generation/async-dependency-callback/module.js | export default await Promise.resolve("a 1");
---
export default await Promise.resolve("a 2");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-multi-callback/index.js | test/hotCases/code-generation/async-dependency-multi-callback/index.js | import update from "../../update";
import a from "./module-a";
import b from "./module-b";
it("should await multiple async dependencies when callback is provided", (done) => {
expect(a).toEqual("a 1");
expect(b).toEqual("b 1");
import.meta.webpackHot.accept(["./module-a", "./module-b"], () => {
expect(a).toEqual... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-multi-callback/module-b.js | test/hotCases/code-generation/async-dependency-multi-callback/module-b.js | export default await Promise.resolve("b 1");
---
export default await Promise.resolve("b 2");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-multi-callback/module-a.js | test/hotCases/code-generation/async-dependency-multi-callback/module-a.js | export default await Promise.resolve("a 1");
---
export default await Promise.resolve("a 2");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/this-in-accept-webpackhot/index.js | test/hotCases/code-generation/this-in-accept-webpackhot/index.js | import x from "./module";
it("should have correct this context", (done) => {
expect(x).toEqual("ok1");
(function() {
import.meta.webpackHot.accept("./module", () => {
expect(x).toEqual("ok2");
expect(this).toEqual({ ok: true });
done();
});
}).call({ ok: true });
NEXT(require("../../update")(done));... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/this-in-accept-webpackhot/module.js | test/hotCases/code-generation/this-in-accept-webpackhot/module.js | export default "ok1";
---
export default "ok2";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-multi/index.js | test/hotCases/code-generation/async-dependency-multi/index.js | import update from "../../update";
import a from "./module-a";
import b from "./module-b";
it("should await multiple async dependencies", (done) => {
expect(a).toEqual("a 1");
expect(b).toEqual("b 1");
import.meta.webpackHot.accept(["./module-a", "./module-b"]);
NEXT(update(done));
import.meta.webpackHot.addSt... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-multi/module-b.js | test/hotCases/code-generation/async-dependency-multi/module-b.js | export default await Promise.resolve("b 1");
---
export default await Promise.resolve("b 2");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/code-generation/async-dependency-multi/module-a.js | test/hotCases/code-generation/async-dependency-multi/module-a.js | export default await Promise.resolve("a 1");
---
export default await Promise.resolve("a 2");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/child-compiler/issue-9706/index.js | test/hotCases/child-compiler/issue-9706/index.js | import value, { assets } from "./report-child-assets-loader!./file";
it("should not emit hot updates from child compilers", done => {
expect(value).toBe(1);
expect(assets).toEqual(["test.js"]);
module.hot.accept("./report-child-assets-loader!./file", () => {
expect(value).toBe(2);
expect(assets).toEqual(["test.... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/child-compiler/issue-9706/report-child-assets-loader.js | test/hotCases/child-compiler/issue-9706/report-child-assets-loader.js | /** @typedef {import("../../../../").Compiler} Compiler */
/** @typedef {import("../../../../").Compilation} Compilation */
const {
SingleEntryPlugin,
node: { NodeTemplatePlugin }
} = require("../../../..");
/** @type {WeakMap<Compiler, Compiler>} */
const compilerCache = new WeakMap();
/** @type {import("../../..... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/child-compiler/issue-9706/file.js | test/hotCases/child-compiler/issue-9706/file.js | export default 1;
---
export default 2;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-chunk/index.js | test/hotCases/esm-output/runtime-chunk/index.js | import { sharedData } from "./shared";
import update from "../../update.esm";
it("should handle HMR with runtime chunk in ESM format", (done) => {
expect(sharedData.version).toBe("1.0.0");
import.meta.webpackHot.accept(["./shared"]);
NEXT(update(done, true, () => {
import("./shared").then(updatedModule => {
... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-chunk/webpack.config.js | test/hotCases/esm-output/runtime-chunk/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
mode: "development",
experiments: {
outputModule: true
},
output: {
module: true,
chunkFormat: "module",
filename: "[name].mjs",
chunkFilename: "[name].chunk.mjs",
enabledLibraryTypes: ["module"]
},
optimization... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-chunk/async-shared.js | test/hotCases/esm-output/runtime-chunk/async-shared.js | export const asyncData = {
loaded: true,
content: "Async shared content"
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-chunk/shared.js | test/hotCases/esm-output/runtime-chunk/shared.js | export const sharedData = {
version: "1.0.0",
timestamp: Date.now()
};
---
export const sharedData = {
version: "2.0.0",
timestamp: Date.now()
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/async-chunks/index.js | test/hotCases/esm-output/async-chunks/index.js | import update from "../../update.esm";
import.meta.webpackHot.accept(["./async-module", "./lazy-module"]);
it("should handle HMR with async chunks in ESM format", (done) => {
// Initial load of async chunks
Promise.all([
import("./async-module"),
import("./lazy-module")
]).then(([asyncModule, lazyModule]) => {
... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/async-chunks/webpack.config.js | test/hotCases/esm-output/async-chunks/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
mode: "development",
experiments: {
outputModule: true
},
output: {
module: true,
chunkFormat: "module",
filename: "[name].mjs",
chunkFilename: "[name].chunk.mjs",
enabledLibraryTypes: ["module"]
},
optimization... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/async-chunks/async-module.js | test/hotCases/esm-output/async-chunks/async-module.js | export const message = "Hello from async module!";
---
export const message = "Updated async module!"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/async-chunks/lazy-module.js | test/hotCases/esm-output/async-chunks/lazy-module.js | export const data = {
type: "lazy",
value: 42
};
---
export const data = {
type: "lazy",
value: 100
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/node-prod/index.js | test/hotCases/esm-output/node-prod/index.js | import test from "./foo.js";
it("should test", () => {
expect(test).toBe("hello world");
}); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/node-prod/foo.js | test/hotCases/esm-output/node-prod/foo.js | import { greeting } from "./module.js";
import update from "../../update.esm.js";
import.meta.webpackHot.accept(["./module.js"]);
it("should update a simple ES module with HMR", (done) => {
expect(greeting).toBe("Hello World!");
NEXT(update(done, true, () => {
// After HMR update, we need to re-import the module... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/node-prod/webpack.config.js | test/hotCases/esm-output/node-prod/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
target: "node",
mode: "production",
entry: {
main: {
import: "./index.js",
dependOn: "foo"
},
foo: {
import: "./foo.js"
}
},
output: {
clean: true,
module: true,
chunkFormat: "module",
filename: "[na... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/node-prod/module.js | test/hotCases/esm-output/node-prod/module.js | export const greeting = "Hello World!";
---
export const greeting = "Hello HMR!";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/css-modules/index.js | test/hotCases/esm-output/css-modules/index.js | import * as styles from "./style.module.css";
import update from "../../update.esm";
import.meta.webpackHot.accept(["./style.module.css", "./style2.module.css"])
it("should work", async function (done) {
expect(styles).toMatchObject({ class: "style_module_css-class" });
const styles2 = await import("./style2.module... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/css-modules/test.config.js | test/hotCases/esm-output/css-modules/test.config.js | "use strict";
module.exports = {
moduleScope(scope) {
const link = scope.window.document.createElement("link");
link.rel = "stylesheet";
link.href = "https://test.cases/path/bundle.css";
scope.window.document.head.appendChild(link);
},
env: "jsdom"
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/css-modules/webpack.config.js | test/hotCases/esm-output/css-modules/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
mode: "development",
experiments: {
outputModule: true,
css: true
},
output: {
module: true,
chunkFormat: "module",
filename: "[name].mjs",
chunkFilename: "[name].chunk.mjs",
enabledLibraryTypes: ["module"]
},
opti... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-and-split-chunks/index.js | test/hotCases/esm-output/runtime-and-split-chunks/index.js | import update from "../../update.esm";
import.meta.webpackHot.accept(["./common/shared", "vendor-lib"]);
it("should handle HMR with split chunks in ESM format", (done) => {
Promise.all([
import("./common/shared"),
import("vendor-lib")
]).then(([commonModule, vendorModule]) => {
expect(commonModule.commonFuncti... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-and-split-chunks/webpack.config.js | test/hotCases/esm-output/runtime-and-split-chunks/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
mode: "production",
experiments: {
outputModule: true
},
output: {
module: true,
chunkFormat: "module",
filename: "[name].mjs",
chunkFilename: "[name].chunk.mjs",
enabledLibraryTypes: ["module"]
},
optimization:... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-and-split-chunks/node_modules/vendor-lib.js | test/hotCases/esm-output/runtime-and-split-chunks/node_modules/vendor-lib.js | const vendorLib = {
version: "1.0.0",
init: function() {
console.log("Vendor lib initialized");
}
};
export default vendorLib;
---
const vendorLib = {
version: "2.0.0",
init: function() {
console.log("Vendor lib initialized v2");
}
};
export default vendorLib;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/runtime-and-split-chunks/common/shared.js | test/hotCases/esm-output/runtime-and-split-chunks/common/shared.js | export function commonFunction(input) {
return `Common function processed: ${input}`;
}
export const commonData = {
shared: true
};
---
export function commonFunction(input) {
return `Updated common function: ${input}`;
}
export const commonData = {
shared: true,
updated: true
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/simple/index.js | test/hotCases/esm-output/simple/index.js | import { greeting } from "./module.js";
import update from "../../update.esm.js";
import.meta.webpackHot.accept(["./module.js"]);
it("should update a simple ES module with HMR", (done) => {
expect(greeting).toBe("Hello World!");
NEXT(update(done, true, () => {
// After HMR update, we need to re-import the module... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/simple/webpack.config.js | test/hotCases/esm-output/simple/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
mode: "development",
experiments: {
outputModule: true
},
output: {
module: true,
chunkFormat: "module",
filename: "[name].mjs",
chunkFilename: "[name].chunk.mjs",
enabledLibraryTypes: ["module"]
},
optimization... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/simple/module.js | test/hotCases/esm-output/simple/module.js | export const greeting = "Hello World!";
---
export const greeting = "Hello HMR!";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/split-chunks/index.js | test/hotCases/esm-output/split-chunks/index.js | import update from "../../update.esm";
import.meta.webpackHot.accept(["./common/shared", "vendor-lib"]);
it("should handle HMR with split chunks in ESM format", (done) => {
Promise.all([
import("./common/shared"),
import("vendor-lib")
]).then(([commonModule, vendorModule]) => {
expect(commonModule.commonFuncti... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/split-chunks/webpack.config.js | test/hotCases/esm-output/split-chunks/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
mode: "development",
experiments: {
outputModule: true
},
output: {
module: true,
chunkFormat: "module",
filename: "[name].mjs",
chunkFilename: "[name].chunk.mjs",
enabledLibraryTypes: ["module"]
},
optimization... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/split-chunks/node_modules/vendor-lib.js | test/hotCases/esm-output/split-chunks/node_modules/vendor-lib.js | const vendorLib = {
version: "1.0.0",
init: function() {
console.log("Vendor lib initialized");
}
};
export default vendorLib;
---
const vendorLib = {
version: "2.0.0",
init: function() {
console.log("Vendor lib initialized v2");
}
};
export default vendorLib;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/esm-output/split-chunks/common/shared.js | test/hotCases/esm-output/split-chunks/common/shared.js | export function commonFunction(input) {
return `Common function processed: ${input}`;
}
export const commonData = {
shared: true
};
---
export function commonFunction(input) {
return `Updated common function: ${input}`;
}
export const commonData = {
shared: true,
updated: true
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/https/index.js | test/hotCases/lazy-compilation/https/index.js | // Avoid errors because of self-signed certificate
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
it("should compile to lazy imported module", done => {
let resolved;
const promise = import("./module").then(r => (resolved = r));
let generation = 0;
import.meta.webpackHot.accept("./module", () => {
generation++... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/https/test.config.js | test/hotCases/lazy-compilation/https/test.config.js | "use strict";
module.exports = {
moduleScope(scope, options) {
if (
(options.target === "web" || options.target === "webworker") &&
!scope.process
) {
scope.process = process;
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/https/webpack.config.js | test/hotCases/lazy-compilation/https/webpack.config.js | "use strict";
const fs = require("fs");
const path = require("path");
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
lazyCompilation: {
entries: false,
backend: {
server: {
key: fs.readFileSync(path.join(__dirname, "key.pem")),
cert: fs.readFileSync(path.j... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/https/module.js | test/hotCases/lazy-compilation/https/module.js | export default 42;
---
export default 42;
---
export default 43;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/universal/dynamic-module.js | test/hotCases/lazy-compilation/universal/dynamic-module.js | export const greeting = "Dynamic Hello World!";
---
export const greeting = "Dynamic Hello HMR!";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/universal/index.js | test/hotCases/lazy-compilation/universal/index.js | import { greeting } from "./module.js";
import update from "../../update.esm.js";
import.meta.webpackHot.accept(["./module.js"]);
it("should update a simple ES module with HMR using universal target", (done) => {
expect(greeting).toBe("Hello World!");
let resolved;
const promise = import("./dynamic-module").then(... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/universal/webpack.config.js | test/hotCases/lazy-compilation/universal/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
mode: "development",
target: ["node", "web"],
experiments: {
outputModule: true,
lazyCompilation: {
entries: false
}
},
output: {
module: true,
chunkFormat: "module",
filename: "[name].mjs",
chunkFilename: "... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/universal/module.js | test/hotCases/lazy-compilation/universal/module.js | export const greeting = "Hello World!";
---
export const greeting = "Hello HMR!";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/module-test/index.js | test/hotCases/lazy-compilation/module-test/index.js | it("should not lazily compile configured imports", done => {
let resolvedA;
let resolvedB;
const promiseA = import("./moduleA").then(r => (resolvedA = r));
const promiseB = import("./moduleB").then(r => (resolvedB = r));
expect(resolvedA).toBe(undefined);
expect(resolvedB).toBe(undefined);
setTimeout(() => {
e... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/module-test/moduleA.js | test/hotCases/lazy-compilation/module-test/moduleA.js | export default "A";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/module-test/webpack.config.js | test/hotCases/lazy-compilation/module-test/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
lazyCompilation: {
entries: false,
test: (module) =>
!/moduleB/.test(/** @type {string} */ (module.nameForCondition()))
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/module-test/moduleB.js | test/hotCases/lazy-compilation/module-test/moduleB.js | export default "B";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/only-entries/index.js | test/hotCases/lazy-compilation/only-entries/index.js | it("should not lazily compile to import() when not configured", done => {
let resolved;
const promise = import("./module").then(r => (resolved = r));
expect(resolved).toBe(undefined);
setTimeout(() => {
expect(resolved).toHaveProperty("default", 42);
done();
}, 1000);
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/only-entries/webpack.config.js | test/hotCases/lazy-compilation/only-entries/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
lazyCompilation: {
entries: false,
imports: false
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/only-entries/module.js | test/hotCases/lazy-compilation/only-entries/module.js | export default 42;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/simple/index.js | test/hotCases/lazy-compilation/simple/index.js | it("should compile to lazy imported module", done => {
let resolved;
const promise = import("./module").then(r => (resolved = r));
let generation = 0;
import.meta.webpackHot.accept("./module", () => {
generation++;
});
expect(resolved).toBe(undefined);
setTimeout(() => {
expect(resolved).toBe(undefined);
e... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/simple/webpack.config.js | test/hotCases/lazy-compilation/simple/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
lazyCompilation: {
entries: false
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/simple/module.js | test/hotCases/lazy-compilation/simple/module.js | export default 42;
---
export default 42;
---
export default 43;
---
export default 44;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/unrelated/index.js | test/hotCases/lazy-compilation/unrelated/index.js | import value from "./module";
const neverCalled = () => import("./lazy");
it("should compile to lazy imported module", done => {
let generation = 0;
module.hot.accept("./module", () => {
generation++;
});
expect(value).toBe(42);
expect(generation).toBe(0);
NEXT(
require("../../update")(done, true, () => {
... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/unrelated/lazy.js | test/hotCases/lazy-compilation/unrelated/lazy.js | export default 123;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/unrelated/webpack.config.js | test/hotCases/lazy-compilation/unrelated/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
lazyCompilation: {
entries: false
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/unrelated/module.js | test/hotCases/lazy-compilation/unrelated/module.js | export default 42;
---
export default 43;
---
export default 44;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/context/index.js | test/hotCases/lazy-compilation/context/index.js | import contextImport from "./context-import.js";
import generation from "./generation.js";
import.meta.webpackHot.accept("./generation.js");
for (const name of ["demo", "module"]) {
it("should compile to lazy imported context element " + name, done => {
let resolved;
const promise = contextImport(name)
.then(... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/context/context-import.js | test/hotCases/lazy-compilation/context/context-import.js | export default key => import(`./modules/${key}`);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/context/webpack.config.js | test/hotCases/lazy-compilation/context/webpack.config.js | "use strict";
/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
lazyCompilation: {
entries: false,
imports: true,
backend: {
listen: {
host: "127.0.0.1"
}
}
}
}
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/context/generation.js | test/hotCases/lazy-compilation/context/generation.js | export default 1;
---
export default 2;
---
export default 3;
---
export default 4;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/context/modules/demo.js | test/hotCases/lazy-compilation/context/modules/demo.js | export default "demo";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/lazy-compilation/context/modules/module.js | test/hotCases/lazy-compilation/context/modules/module.js | export default "module";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/import-attributes/commonjs/index.js | test/hotCases/import-attributes/commonjs/index.js | import foo from "./foo.js";
it("should handle HMR for commonjs", async function (done) {
expect(foo).toBe("foo1");
const { default: hi } = await import("./hi.t", { with: { type: "text" }});
expect(hi).toBe("hi");
const { default: info } = await import("./info.json", { with: { type: "json" }});
expect(info.name)... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/import-attributes/commonjs/foo.js | test/hotCases/import-attributes/commonjs/foo.js | export default "foo1";
---
export default "foo2"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/import-attributes/commonjs/webpack.config.js | test/hotCases/import-attributes/commonjs/webpack.config.js | "use strict";
/** @type {import("../../../../types").Configuration} */
module.exports = {
mode: "development",
devtool: false
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/import-attributes/esm/index.js | test/hotCases/import-attributes/esm/index.js | import foo from "./foo.js";
it("should handle HMR for esm", async function (done) {
expect(foo).toBe("foo1");
const { default: hi } = await import("./hi.t", { with: { type: "text" }});
expect(hi).toBe("hi");
const { default: info } = await import("./info.json", { with: { type: "json" }});
expect(info.name).toBe... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/hotCases/import-attributes/esm/foo.js | test/hotCases/import-attributes/esm/foo.js | export default "foo1";
---
export default "foo2"; | 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.