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/compiletime/exports-presence/webpack.config.js
test/configCases/compiletime/exports-presence/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "production", module: { rules: [ { test: /aaa/, parser: { exportsPresence: false } }, { test: /bbb/, parser: { exportsPresence: "warn" } }, { test: /ccc/, parser: { ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/compiletime/exports-presence/errors.js
test/configCases/compiletime/exports-presence/errors.js
"use strict"; module.exports = [ { moduleName: /ccc/, message: /NotHere.+not found/ }, { moduleName: /ccc/, message: /NoNo.+not found/ } ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/compiletime/exports-presence/ddd/index.js
test/configCases/compiletime/exports-presence/ddd/index.js
import { NoNo } from "../stub"; export { NotHere } from "../stub"; export default `${typeof NoNo}`;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/compiletime/exports-presence/bbb/index.js
test/configCases/compiletime/exports-presence/bbb/index.js
import { NoNo } from "../stub"; export { NotHere } from "../stub"; export default `${typeof NoNo}`;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/compiletime/exports-presence/ccc/index.js
test/configCases/compiletime/exports-presence/ccc/index.js
import { NoNo } from "../stub"; export { NotHere } from "../stub"; export default `${typeof NoNo}`;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/compiletime/exports-presence/aaa/index.js
test/configCases/compiletime/exports-presence/aaa/index.js
import { NoNo } from "../stub"; export { NotHere } from "../stub"; export default `${typeof NoNo}`;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/no-source-map/index.js
test/configCases/source-map/no-source-map/index.js
import ok from "./loader!"; it("should handle chunks", () => import("./chunk")); it("should handle loaders", () => { expect(ok).toBe("ok"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/no-source-map/loader.js
test/configCases/source-map/no-source-map/loader.js
const path = require("path"); /** @type {import("../../../../").LoaderDefinition} */ module.exports = function () { this.callback(null, "module.exports = 'ok';", { version: 3, file: "/should/be/removed", sourceRoot: path.join(__dirname, "folder"), sources: ["test1.txt"], sourcesContent: ["Test"], names: []...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/no-source-map/chunk.js
test/configCases/source-map/no-source-map/chunk.js
export default 42;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/no-source-map/webpack.config.js
test/configCases/source-map/no-source-map/webpack.config.js
"use strict"; /** @typedef {import("../../../../").WebpackPluginFunction} WebpackPluginFunction */ /** @type {WebpackPluginFunction[]} */ const plugins = [ (compiler) => { compiler.hooks.emit.tap("Test", (compilation) => { for (const asset of compilation.getAssets()) { const result = asset.source.sourceAndM...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/default-filename-extensions-mjs/index.js
test/configCases/source-map/default-filename-extensions-mjs/index.js
it("creates source maps for .mjs output files by default", function() { var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); var match = /sourceMappingURL\s*=\s*(.*)/.exec(source); expect(match[1]).toBe("bundle0.mjs.map"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/default-filename-extensions-mjs/test.js
test/configCases/source-map/default-filename-extensions-mjs/test.js
var foo = {}; module.exports = foo;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js
test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", output: { filename: "bundle0.mjs" }, node: { __dirname: false, __filename: false }, devtool: "source-map" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtools-default/index.js
test/configCases/source-map/devtools-default/index.js
import fs from "fs"; import path from "path"; import "./foo.css"; const readFile = (filename) => { return fs.readFileSync(path.join(__dirname, filename), "utf-8"); }; const getSourceMap = (filename) => { return JSON.parse(readFile(filename)); }; it("should compile successfully and have individual css sourcemap", a...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtools-default/webpack.config.js
test/configCases/source-map/devtools-default/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", target: ["web", "node"], experiments: { css: true, outputModule: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/harmony-eval-source-map/index.js
test/configCases/source-map/harmony-eval-source-map/index.js
export {} it("should run fine", function() {});
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/harmony-eval-source-map/webpack.config.js
test/configCases/source-map/harmony-eval-source-map/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "eval-source-map" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/object-as-output-library/index.js
test/configCases/source-map/object-as-output-library/index.js
it("should compile successfully when output.library is an object of type:name", function() {});
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/object-as-output-library/webpack.config.js
test/configCases/source-map/object-as-output-library/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "source-map", output: { library: { root: "[name]", amd: "[name]", commonjs: "[name]" }, libraryTarget: "umd" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/nosources/index.js
test/configCases/source-map/nosources/index.js
it("should not include sourcesContent if noSources option is used", function() { var fs = require("fs"); var source = fs.readFileSync(__filename + ".map", "utf-8"); var map = JSON.parse(source); expect(map).not.toHaveProperty("sourcesContent"); }); if (Math.random() < 0) require("./test.js");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/nosources/test.js
test/configCases/source-map/nosources/test.js
var foo = {}; module.exports = foo;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/nosources/webpack.config.js
test/configCases/source-map/nosources/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", node: { __dirname: false, __filename: false }, devtool: "nosources-source-map" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtools-customize/index.js
test/configCases/source-map/devtools-customize/index.js
import fs from "fs"; import path from "path"; import "./foo.css"; const readFile = (filename) => { return fs.readFileSync(path.join(__dirname, filename), "utf-8"); }; const getSourceMap = (filename) => { return JSON.parse(readFile(filename)); }; it("should compile successfully and have individual css sourcemap", a...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtools-customize/webpack.config.js
test/configCases/source-map/devtools-customize/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: ["web", "node"], experiments: { css: true, outputModule: true }, devtool: [ { type: "all", use: "source-map" } ], plugins: [ { apply(compiler) { // TODO webpack6 - we will remove compatibility logi...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/module-names/index.js
test/configCases/source-map/module-names/index.js
function getSourceMap(filename) { var fs = require("fs"); var source = fs.readFileSync(__dirname + "/" + filename + ".map", "utf-8"); var map = JSON.parse(source); return map; } it("should include test.js in SourceMap", function () { var allSources = new Set(); var map = getSourceMap("bundle0.js"); for (var sou...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/module-names/test.js
test/configCases/source-map/module-names/test.js
var foo = {}; module.exports = foo;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/module-names/webpack.config.js
test/configCases/source-map/module-names/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", output: { chunkFilename: "[name].js", devtoolModuleFilenameTemplate: "module", devtoolFallbackModuleFilenameTemplate: "fallback" }, node: { __dirname: false, __filename: false }, devtool: "source-m...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/namespace-source-path-no-truncate/index.js
test/configCases/source-map/namespace-source-path-no-truncate/index.js
it("should include [id].js in SourceMap", function () { var fs = require("fs"); var source = fs.readFileSync(__filename + ".map", "utf-8"); var map = JSON.parse(source); expect(map.sources).toContain("webpack:///./[id].js"); }); if (Math.random() < 0) require("./[id].js");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/namespace-source-path-no-truncate/webpack.config.js
test/configCases/source-map/namespace-source-path-no-truncate/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { node: { __dirname: false, __filename: false }, devtool: "source-map", optimization: { minimize: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/namespace-source-path-no-truncate/[id].js
test/configCases/source-map/namespace-source-path-no-truncate/[id].js
var foo = {}; module.exports = foo;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/exclude-modules-source-map/index.js
test/configCases/source-map/exclude-modules-source-map/index.js
it("bundle1 should include eval sourcemapped test1.js and test2.js as is", function() { var fs = require("fs"); var path = require("path"); var bundle1 = fs.readFileSync(path.join(__dirname, "bundle1.js"), "utf-8"); expect(bundle1).toMatch("eval(\"{var test1marker"); expect(bundle1).toMatch("var test2marker"); ex...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/exclude-modules-source-map/test2.js
test/configCases/source-map/exclude-modules-source-map/test2.js
var test2marker = {}; module.exports = test2marker;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/exclude-modules-source-map/webpack.config.js
test/configCases/source-map/exclude-modules-source-map/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { node: { __dirname: false, __filename: false }, entry: { bundle0: ["./index.js"], bundle1: ["./test1.js", "./test2.js"] }, output: { filename: "[name].js" }, plugins: [ new w...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/exclude-modules-source-map/test1.js
test/configCases/source-map/exclude-modules-source-map/test1.js
var test1marker = {}; module.exports = test1marker;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/array-as-output-library-in-object-output/index.js
test/configCases/source-map/array-as-output-library-in-object-output/index.js
it("should compile successfully when output.library.root is an array of strings", function () { });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/array-as-output-library-in-object-output/webpack.config.js
test/configCases/source-map/array-as-output-library-in-object-output/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "source-map", output: { library: { root: ["Foo", "[name]"], amd: "[name]", commonjs: "[name]" }, libraryTarget: "umd" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/context-module-source-path/index.js
test/configCases/source-map/context-module-source-path/index.js
const foo = Math.random() > 0.5 ? "a" : "b"; require(`./foo/${foo}.js`); it("context module should use relative path in source map file", () => { var fs = require("fs"); var source = fs.readFileSync(__filename + ".map", "utf-8"); var map = JSON.parse(source); expect(map.sources).toContain("webpack:///./foo/ sync ^...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/context-module-source-path/webpack.config.js
test/configCases/source-map/context-module-source-path/webpack.config.js
"use strict"; module.exports = { node: { __dirname: false, __filename: false }, devtool: "source-map" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/context-module-source-path/foo/b.js
test/configCases/source-map/context-module-source-path/foo/b.js
module.exports = "b";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/context-module-source-path/foo/a.js
test/configCases/source-map/context-module-source-path/foo/a.js
module.exports = "a";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/namespace-source-path.library/index.js
test/configCases/source-map/namespace-source-path.library/index.js
it("should include webpack://mylibrary/./test.js in SourceMap", function() { var fs = require("fs"); var source = fs.readFileSync(__filename + ".map", "utf-8"); var map = JSON.parse(source); expect(map.sources).toContain("webpack://mylibrary/./test.js"); }); if (Math.random() < 0) require("./test.js");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/namespace-source-path.library/test.js
test/configCases/source-map/namespace-source-path.library/test.js
var foo = {}; module.exports = foo;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/namespace-source-path.library/webpack.config.js
test/configCases/source-map/namespace-source-path.library/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", output: { library: "mylibrary" }, node: { __dirname: false, __filename: false }, devtool: "cheap-source-map" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtool-namespace-with-source-map/index.js
test/configCases/source-map/devtool-namespace-with-source-map/index.js
it("should include webpack://library-entry-a/./src/entry-a.js in SourceMap", function() { var fs = require("fs"); var source = fs.readFileSync(__filename + ".map", "utf-8"); var map = JSON.parse(source); expect(map.sources).toContain("sourceURL=webpack://library-entry-a/./src/entry-a.js"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtool-namespace-with-source-map/test.config.js
test/configCases/source-map/devtool-namespace-with-source-map/test.config.js
"use strict"; module.exports = { findBundle() { return ["entry-a-bundle.js", "entry-b-bundle.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtool-namespace-with-source-map/webpack.config.js
test/configCases/source-map/devtool-namespace-with-source-map/webpack.config.js
"use strict"; const path = require("path"); /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", entry: { "entry-a": [path.join(__dirname, "./src/entry-a")], "entry-b": [path.join(__dirname, "./src/entry-b")] }, output: { filename: "[name]-bundle.js", library: "libr...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtool-namespace-with-source-map/src/entry-a.js
test/configCases/source-map/devtool-namespace-with-source-map/src/entry-a.js
it("should include webpack://library-entry-a/./src/entry-a.js in SourceMap", function() { const fs = require("fs"); const source = fs.readFileSync(__filename + ".map", "utf-8"); const map = JSON.parse(source); expect(map.sources).toContain("webpack://library-entry-a/./src/entry-a.js"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/devtool-namespace-with-source-map/src/entry-b.js
test/configCases/source-map/devtool-namespace-with-source-map/src/entry-b.js
it("should include webpack://library-entry-b/./src/entry-b.js in SourceMap", function() { const fs = require("fs"); const source = fs.readFileSync(__filename + ".map", "utf-8"); const map = JSON.parse(source); expect(map.sources).toContain("webpack://library-entry-b/./src/entry-b.js"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/loader-source-map/index.js
test/configCases/source-map/loader-source-map/index.js
import mod from "./module.js"; it("should correctly work with source maps", () => { expect(mod).toBe(42); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/loader-source-map/loader.js
test/configCases/source-map/loader-source-map/loader.js
const babel = require("@babel/core"); /** @typedef {import("@babel/core").BabelFileResult} BabelFileResult */ /** @typedef {import("@babel/core").TransformOptions} TransformOptions */ /** @typedef {import("estree").SimpleLiteral} SimpleLiteral */ /** @type {import("../../../../").LoaderDefinition} */ module.exports ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/loader-source-map/webpack.config.js
test/configCases/source-map/loader-source-map/webpack.config.js
"use strict"; /** @type {import("webpack").Configuration} */ const config = { devtool: "source-map", module: { rules: [ { test: /\.js$/, use: [ { loader: require.resolve("./loader.js") } ] } ] } }; module.exports = config;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/loader-source-map/module.js
test/configCases/source-map/loader-source-map/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/configCases/source-map/hidden-source-map-debugids/index.js
test/configCases/source-map/hidden-source-map-debugids/index.js
const fs = require("fs"); it("source should include only debugId comment", function() { const debugIdRegex = new RegExp('[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}', 'i'); const debugIdCommentRegex = new RegExp(`\n\/\/# debugId\s*=\s*${debugIdRegex.source}$`); const source = fs.readFileSync(__fil...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/hidden-source-map-debugids/webpack.config.js
test/configCases/source-map/hidden-source-map-debugids/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "hidden-source-map-debugids" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/loader-source-root.js
test/configCases/source-map/relative-source-maps-by-loader/loader-source-root.js
const path = require("path"); /** @type {import("../../../../").LoaderDefinition} */ module.exports = function () { this.callback(null, "module.exports = 'ok';", { version: 3, file: "/should/be/removed", sourceRoot: path.join(__dirname, "folder"), sources: ["test1.txt"], sourcesContent: ["Test"], names: []...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/index.js
test/configCases/source-map/relative-source-maps-by-loader/index.js
it("should run", () => { require("./loader-source-root!"); require("./loader-source-root-slash!"); require("./loader-source-root-source-slash!"); require("./loader-source-root-2-slash!"); require("./loader-no-source-root!"); require("./loader-pre-relative!"); }); it("should generate the correct SourceMap", funct...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/loader-no-source-root.js
test/configCases/source-map/relative-source-maps-by-loader/loader-no-source-root.js
const path = require("path"); /** @type {import("../../../../").LoaderDefinition} */ module.exports = function () { this.callback(null, "module.exports = 'ok';", { version: 3, file: "/should/be/removed", sources: [path.join(__dirname, "folder", "test5.txt")], sourcesContent: ["Test"], names: [], mappings: ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/loader-source-root-source-slash.js
test/configCases/source-map/relative-source-maps-by-loader/loader-source-root-source-slash.js
const path = require("path"); /** @type {import("../../../../").LoaderDefinition} */ module.exports = function () { this.callback(null, "module.exports = 'ok';", { version: 3, file: "/should/be/removed", sourceRoot: path.join(__dirname, "folder"), sources: ["/test2.txt"], sourcesContent: ["Test"], names: [...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/webpack.config.js
test/configCases/source-map/relative-source-maps-by-loader/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", node: { __dirname: false, __filename: false }, devtool: "source-map" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/loader-source-root-slash.js
test/configCases/source-map/relative-source-maps-by-loader/loader-source-root-slash.js
const path = require("path"); /** @type {import("../../../../").LoaderDefinition} */ module.exports = function () { this.callback(null, "module.exports = 'ok';", { version: 3, file: "/should/be/removed", sourceRoot: path.join(__dirname, "folder") + "/", sources: ["test3.txt"], sourcesContent: ["Test"], nam...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/loader-source-root-2-slash.js
test/configCases/source-map/relative-source-maps-by-loader/loader-source-root-2-slash.js
const path = require("path"); /** @type {import("../../../../").LoaderDefinition} */ module.exports = function () { this.callback(null, "module.exports = 'ok';", { version: 3, file: "/should/be/removed", sourceRoot: path.join(__dirname, "folder") + "/", sources: ["/test4.txt"], sourcesContent: ["Test"], na...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-maps-by-loader/loader-pre-relative.js
test/configCases/source-map/relative-source-maps-by-loader/loader-pre-relative.js
/** @type {import("../../../../").LoaderDefinition} */ module.exports = function () { this.callback(null, "module.exports = 'ok';", { version: 3, file: "/should/be/removed", sources: ["webpack://./folder/test6.txt"], sourcesContent: ["Test"], names: [], mappings: "AAAA" }); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map-css/index.js
test/configCases/source-map/extract-source-map-css/index.js
import "./app.css"; it("should compile", done => { const links = document.getElementsByTagName("link"); const css = []; // Skip first because import it by default for (const link of links.slice(1)) { css.push(link.sheet.css); } expect(css).toMatchSnapshot(); done(); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map-css/test.config.js
test/configCases/source-map/extract-source-map-css/test.config.js
"use strict"; module.exports = { moduleScope(scope) { const link = scope.window.document.createElement("link"); link.rel = "stylesheet"; link.href = "bundle0.css"; scope.window.document.head.appendChild(link); } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map-css/webpack.config.js
test/configCases/source-map/extract-source-map-css/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "web", mode: "development", devtool: "source-map", module: { rules: [ { test: /\.css$/i, type: "css", extractSourceMap: true } ] }, experiments: { css: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-ignore-list/used.js
test/configCases/source-map/source-map-ignore-list/used.js
export default "used";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-ignore-list/index.js
test/configCases/source-map/source-map-ignore-list/index.js
import used from "./used"; import ignored from "./ignored"; import fs from "fs"; import path from "path"; const getSourceMap = () => { const content = fs.readFileSync( path.join(__dirname, "bundle0.js.map"), "utf-8" ); return JSON.parse(content); }; const map = getSourceMap(); it("marks matching modules in ig...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-ignore-list/ignored.js
test/configCases/source-map/source-map-ignore-list/ignored.js
export default "ignored";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-ignore-list/webpack.config.js
test/configCases/source-map/source-map-ignore-list/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", devtool: false, plugins: [ new webpack.SourceMapDevToolPlugin({ filename: "[file].map", ignoreList: [/ignored\.js/] }) ] };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-with-profiling-plugin/test.filter.js
test/configCases/source-map/source-map-with-profiling-plugin/test.filter.js
"use strict"; module.exports = () => !process.env.CI;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-with-profiling-plugin/index.js
test/configCases/source-map/source-map-with-profiling-plugin/index.js
it("bundle0 should include sourcemapped test.js", function() { var fs = require("fs"); var source = fs.readFileSync(__filename + ".map", "utf-8"); var map = JSON.parse(source); expect(map.sources).toContain("webpack:///./test.js"); }); if (Math.random() < 0) require("./test.js");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-with-profiling-plugin/deprecations.js
test/configCases/source-map/source-map-with-profiling-plugin/deprecations.js
"use strict"; module.exports = [ { code: /DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK/ } ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-with-profiling-plugin/test.js
test/configCases/source-map/source-map-with-profiling-plugin/test.js
var foo = {}; module.exports = foo;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-with-profiling-plugin/webpack.config.js
test/configCases/source-map/source-map-with-profiling-plugin/webpack.config.js
"use strict"; const os = require("os"); const path = require("path"); const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { node: { __dirname: false, __filename: false }, entry: { bundle0: ["./index.js"] }, output: { filename: "[name].js" }, plu...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/default-filename-extensions-css/index.js
test/configCases/source-map/default-filename-extensions-css/index.js
import "./style.css"; import fs from "fs"; import path from "path"; it("creates source maps for .css output files by default", function() { const css = fs.readFileSync(path.resolve(__dirname, "style.css"), "utf-8"); const map = JSON.parse(fs.readFileSync(path.resolve(__dirname, "style.css.map"), "utf-8")); var mat...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/default-filename-extensions-css/webpack.config.js
test/configCases/source-map/default-filename-extensions-css/webpack.config.js
"use strict"; const MiniCssExtractPlugin = require("mini-css-extract-plugin"); /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", output: { filename: "bundle0.js" }, node: { __dirname: false, __filename: false }, devtool: "source-map", module: { rules: [ { ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/eval-source-map-debugids/index.js
test/configCases/source-map/eval-source-map-debugids/index.js
const fs = require("fs"); it("should not include sourcesContent if noSources option is used", function() { const source = fs.readFileSync(__filename, "utf-8"); const match = /\/\/# sourceMappingURL\s*=\s*data:application\/json;charset=utf-8;base64,(.*)\\n\/\/#/.exec(source); const mapString = Buffer.from(match[1],...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/eval-source-map-debugids/test.js
test/configCases/source-map/eval-source-map-debugids/test.js
var foo = {}; module.exports = foo;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/eval-source-map-debugids/webpack.config.js
test/configCases/source-map/eval-source-map-debugids/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "eval-source-map-debugids" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-filename-contenthash/index.js
test/configCases/source-map/source-map-filename-contenthash/index.js
it("should contain contenthash as query parameter and path", function () { var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); var match = /sourceMappingURL\s*=.*-([A-Fa-f0-9]{32})\.map\?([A-Fa-f0-9]{32})-([A-Fa-f0-9]{6})/.exec( source ); expect(match.length).toBe(4); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-filename-contenthash/webpack.config.js
test/configCases/source-map/source-map-filename-contenthash/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", node: { __dirname: false, __filename: false }, devtool: "source-map", output: { filename: "bundle0.js?[contenthash]", sourceMapFilename: "[file]-[contenthash].map?[contenthash]-[contenthash:6][quer...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map2/test.filter.js
test/configCases/source-map/extract-source-map2/test.filter.js
"use strict"; module.exports = function filter() { return process.platform !== "win32"; };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map2/index.js
test/configCases/source-map/extract-source-map2/index.js
const fs = require("fs"); const path = require("path"); require("./a"); it("should extract source map", () => { const fileData = fs.readFileSync(path.resolve(__dirname, "bundle0.js.map")).toString("utf-8"); const { sources, sourcesContent } = JSON.parse(fileData); expect(sources.includes("webpack:///./external-sou...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map2/webpack.config.js
test/configCases/source-map/extract-source-map2/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node", entry: "./index", devtool: "source-map", module: { rules: [ { test: /\.js$/, extractSourceMap: true, loader: require.resolve("./babel-loader") } ] } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map2/babel-loader.js
test/configCases/source-map/extract-source-map2/babel-loader.js
/** @typedef {import("webpack").LoaderContext<void>} LoaderContext */ const assert = require("assert") /** * @this {LoaderContext} * @param {string} source The source code to process * @param {import("webpack-sources").RawSourceMap} sourceMap The source map to process * @returns {void} */ module.exports = functi...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map2/a.js
test/configCases/source-map/extract-source-map2/a.js
const a = 1; // comment //#sourceMappingURL=/a.map
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-debugids/index.js
test/configCases/source-map/source-map-debugids/index.js
const fs = require("fs"); it("source should include debug id that matches debugId key in sourcemap", function() { const source = fs.readFileSync(__filename, "utf-8"); const sourceMap = fs.readFileSync(__filename + ".map", "utf-8"); const map = JSON.parse(sourceMap); expect(map.debugId).toBeDefined(); expect( /[...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/source-map-debugids/webpack.config.js
test/configCases/source-map/source-map-debugids/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "source-map-debugids" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/test3.js
test/configCases/source-map/extract-source-map/test3.js
const a = 1; // comment //#sourceMappingURL=/test2.map
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/extract1.js
test/configCases/source-map/extract-source-map/extract1.js
"use strict"; const fs = require("fs"); const path = require("path"); require("./test1"); require("./no-source-map"); it("should extract source map - 1", () => { const fileData = fs.readFileSync(__filename + ".map").toString("utf-8"); const { sources } = JSON.parse(fileData); expect(sources).toContain("webpack://...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/warnings.js
test/configCases/source-map/extract-source-map/warnings.js
"use strict"; module.exports = [[/Failed to parse source map/]];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/extract2.js
test/configCases/source-map/extract-source-map/extract2.js
"use strict"; const fs = require("fs"); require("./test2"); it("should extract source map - 2", () => { const fileData = fs.readFileSync(__filename + ".map").toString("utf-8"); const { sources } = JSON.parse(fileData); expect(sources).toContain("webpack:///./external-source-map.txt"); expect(sources).toContain("...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/no-source-map.js
test/configCases/source-map/extract-source-map/no-source-map.js
const a = 1; //#sourceMappingURL=no-source-map.map
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/remove-comment.js
test/configCases/source-map/extract-source-map/remove-comment.js
"use strict"; const fs = require("fs"); require("./test1"); it("should remove sourceMap comment", () => { expect( fs.readFileSync(__filename).toString("utf-8") ).not.toMatch(/\/\/\s*@\s*sourceMappingURL/); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/test2.js
test/configCases/source-map/extract-source-map/test2.js
const a = 1; // comment //#sourceMappingURL=test2.map
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/infrastructure-log.js
test/configCases/source-map/extract-source-map/infrastructure-log.js
"use strict"; module.exports = [ /^Pack got invalid because of write to: Compilation\/modules.+no-source-map\.js$/ ];
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/webpack.config.js
test/configCases/source-map/extract-source-map/webpack.config.js
"use strict"; const path = require("path"); /** @type {import("../../../../").Configuration[]} */ module.exports = [ { target: "node", entry: "./extract1", devtool: "source-map", module: { rules: [ { extractSourceMap: true } ] } }, { target: "node", entry: "./extract2", devtool: ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/extract3.js
test/configCases/source-map/extract-source-map/extract3.js
"use strict"; const fs = require("fs"); const path = require("path"); require("./test3"); it("should extract source map - 3", () => { const fileData = fs.readFileSync(__filename + ".map").toString("utf-8"); const { sources } = JSON.parse(fileData); expect(sources).toContain("webpack:///./external-source-map.txt")...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/extract4.js
test/configCases/source-map/extract-source-map/extract4.js
"use strict"; const fs = require("fs"); require("./test4"); it("should extract source map - 4", () => { const fileData = fs.readFileSync(__filename + ".map").toString("utf-8"); const { sources } = JSON.parse(fileData); expect(sources.includes("webpack:///antd/./components/button/index.tsx")).toBe(true); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/extract-source-map/test1.js
test/configCases/source-map/extract-source-map/test1.js
const a = 1; // @ sourceMappingURL = data:application/source-map;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnNldC1pbmxpbmUtc291cmNlLW1hcC5qcyIsInNvdXJjZXMiOlsiY2hhcnNldC1pbmxpbmUtc291cmNlLW1hcC50eHQiXSwic291cmNlc0NvbnRlbnQiOlsid2l0aCBTb3VyY2VNYXAiXSwibWFwcGluZ3MiOiJBQUFBIn0= // comment
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false