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/source-map/extract-source-map/test4.js
test/configCases/source-map/extract-source-map/test4.js
const a = 1; // comment //#sourceMappingURL=https://cdnjs.cloudflare.com/ajax/libs/antd/5.27.3/antd.min.js.map
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/sources-array-production/index.js
test/configCases/source-map/sources-array-production/index.js
it("should include 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:///./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/sources-array-production/test.js
test/configCases/source-map/sources-array-production/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/sources-array-production/webpack.config.js
test/configCases/source-map/sources-array-production/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/loader-source-map-string/index.js
test/configCases/source-map/loader-source-map-string/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-string/loader.js
test/configCases/source-map/loader-source-map-string/loader.js
const babel = require("@babel/core"); /** @typedef {import("@babel/core").BabelFileResult} BabelFileResult */ /** @typedef {import("@babel/core").TransformOptions} TransformOptions */ /** @type {import("../../../../").LoaderDefinition} */ module.exports = function(source, inputSourceMap) { const callback = this.asy...
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-string/webpack.config.js
test/configCases/source-map/loader-source-map-string/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-string/module.js
test/configCases/source-map/loader-source-map-string/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/harmony-eval/index.js
test/configCases/source-map/harmony-eval/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/webpack.config.js
test/configCases/source-map/harmony-eval/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "eval" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/resource-path/index.js
test/configCases/source-map/resource-path/index.js
it("should not include layer or type in absoluteResourcePath", function () { var fs = require("fs"); var path = require("path"); var source = fs.readFileSync(__filename + ".map", "utf-8"); var map = JSON.parse(source); expect(map.sources).toContain( path.resolve( __dirname, "../../../..//configCases/source...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/resource-path/test.js
test/configCases/source-map/resource-path/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/resource-path/webpack.config.js
test/configCases/source-map/resource-path/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { node: { __dirname: false, __filename: false }, devtool: "source-map", entry: { main: { import: "./index", layer: "something" } }, output: { devtoolModuleFilenameTemplate(info) { return info.absoluteResourcePat...
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-ignore-list/used.js
test/configCases/source-map/eval-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/eval-source-map-ignore-list/index.js
test/configCases/source-map/eval-source-map-ignore-list/index.js
import used from "./used"; import ignored from "./ignored"; import fs from "fs"; const getSourceMap = () => { 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.fro...
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-ignore-list/ignored.js
test/configCases/source-map/eval-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/eval-source-map-ignore-list/webpack.config.js
test/configCases/source-map/eval-source-map-ignore-list/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { devtool: false, plugins: [ new webpack.EvalSourceMapDevToolPlugin({ ignoreList: [/ignored\.js/] }) ], optimization: { // Ensure the correct `sourceMappingURL` is detected concat...
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-js/index.js
test/configCases/source-map/default-filename-extensions-js/index.js
it("creates source maps for .js 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.js.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-js/test.js
test/configCases/source-map/default-filename-extensions-js/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-js/webpack.config.js
test/configCases/source-map/default-filename-extensions-js/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", output: { filename: "bundle0.js" }, 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/namespace-source-path/index.js
test/configCases/source-map/namespace-source-path/index.js
it("should include webpack://mynamespace/./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://mynamespace/./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/test.js
test/configCases/source-map/namespace-source-path/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/webpack.config.js
test/configCases/source-map/namespace-source-path/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", output: { devtoolNamespace: "mynamespace" }, 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/eval-source-map/test.filter.js
test/configCases/source-map/eval-source-map/test.filter.js
"use strict"; const supportsOptionalChaining = require("../../../helpers/supportsOptionalChaining"); module.exports = () => supportsOptionalChaining();
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/index.js
test/configCases/source-map/eval-source-map/index.js
it("should not include sourcesContent if noSources option is used", function() { var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); var match = /\/\/# sourceMappingURL\s*=\s*data:application\/json;charset=utf-8;base64,(.*)\\n\/\/#/.exec(source); var mapString = Buffer.from(match[1], 'base6...
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/test.js
test/configCases/source-map/eval-source-map/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/webpack.config.js
test/configCases/source-map/eval-source-map/webpack.config.js
"use strict"; const devtool = "eval-source-map"; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { devtool }, { devtool, optimization: { moduleIds: "natural" } }, { devtool, optimization: { moduleIds: "named" } }, { devtool, optimization: { moduleIds: "determ...
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/node_modules/pkg/index.js
test/configCases/source-map/eval-source-map/node_modules/pkg/index.js
import "../../index.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-eval/test.config.js
test/configCases/source-map/devtool-namespace-with-eval/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-eval/webpack.config.js
test/configCases/source-map/devtool-namespace-with-eval/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-eval/src/entry-a.js
test/configCases/source-map/devtool-namespace-with-eval/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, "utf-8"); expect(source).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-eval/src/entry-b.js
test/configCases/source-map/devtool-namespace-with-eval/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, "utf-8"); expect(source).toContain("sourceURL=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/exclude-chunks-source-map/index.js
test/configCases/source-map/exclude-chunks-source-map/index.js
it("should include test.js in SourceMap for bundle0 chunk", 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"); }); it("should not produce a SourceMap for vendors chunk", function() { ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/exclude-chunks-source-map/test.js
test/configCases/source-map/exclude-chunks-source-map/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/exclude-chunks-source-map/webpack.config.js
test/configCases/source-map/exclude-chunks-source-map/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", devtool: false, node: { __dirname: false, __filename: false }, entry: { bundle0: ["./index.js"], vendors: ["./vendors.js"] }, output: { filename: "[name]....
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/exclude-chunks-source-map/vendors.js
test/configCases/source-map/exclude-chunks-source-map/vendors.js
var bar = {}; module.exports = bar;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/relative-source-map-path/index.js
test/configCases/source-map/relative-source-map-path/index.js
it("should have a relative url to the source-map", function() { var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); var match = /sourceMappingURL\s*=\s*(.*)/.exec(source); expect(match[1]).toBe("bundle0.js.map"); }); it("should have a relative url to the source-map with prefix", function(don...
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-map-path/test.js
test/configCases/source-map/relative-source-map-path/test.js
var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); var match = /sourceMappingURL\s*=\s*(.*)/.exec(source); expect(match[1]).toBe("c.js.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-map-path/webpack.config.js
test/configCases/source-map/relative-source-map-path/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { mode: "development", output: { chunkFilename: "js/chunks/c.js" }, 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/array-as-output-library/index.js
test/configCases/source-map/array-as-output-library/index.js
it("should compile successfully when output.library 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/webpack.config.js
test/configCases/source-map/array-as-output-library/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { devtool: "source-map", output: { library: ["Foo", "[name]"] } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/test-fn-modules-source-map/index.js
test/configCases/source-map/test-fn-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/test-fn-modules-source-map/test2.js
test/configCases/source-map/test-fn-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/test-fn-modules-source-map/webpack.config.js
test/configCases/source-map/test-fn-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/test-fn-modules-source-map/test1.js
test/configCases/source-map/test-fn-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/eval-nosources-source-map/test.filter.js
test/configCases/source-map/eval-nosources-source-map/test.filter.js
"use strict"; const supportsOptionalChaining = require("../../../helpers/supportsOptionalChaining"); module.exports = () => supportsOptionalChaining();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/eval-nosources-source-map/index.js
test/configCases/source-map/eval-nosources-source-map/index.js
it("should not include sourcesContent if noSources option is used", function() { var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); var match = /\/\/# sourceMappingURL\s*=\s*data:application\/json;charset=utf-8;base64,(.*)\\n\/\/#/.exec(source); var mapString = Buffer.from(match[1], 'base6...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/eval-nosources-source-map/test.js
test/configCases/source-map/eval-nosources-source-map/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-nosources-source-map/webpack.config.js
test/configCases/source-map/eval-nosources-source-map/webpack.config.js
"use strict"; const devtool = "eval-nosources-source-map"; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { devtool }, { devtool, optimization: { moduleIds: "natural" } }, { devtool, optimization: { moduleIds: "named" } }, { devtool, optimization: { moduleId...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/eval-nosources-source-map/node_modules/pkg/index.js
test/configCases/source-map/eval-nosources-source-map/node_modules/pkg/index.js
import "../../index.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-eval-source-map/test.config.js
test/configCases/source-map/devtool-namespace-with-eval-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-eval-source-map/webpack.config.js
test/configCases/source-map/devtool-namespace-with-eval-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-eval-source-map/src/entry-a.js
test/configCases/source-map/devtool-namespace-with-eval-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, "utf-8"); expect(source).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-eval-source-map/src/entry-b.js
test/configCases/source-map/devtool-namespace-with-eval-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, "utf-8"); expect(source).toContain("sourceURL=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/dual-source-map-plugins/entry1.js
test/configCases/source-map/dual-source-map-plugins/entry1.js
import fs from "fs"; import path from "path"; const getSourceMap = (filename) => { const content = fs.readFileSync(path.join(__dirname, filename), "utf-8"); return JSON.parse(content); }; it("should compile successfully and have dual sourcemap", () => { let map = getSourceMap("bundle0.js.map"); expect(map.sources...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/dual-source-map-plugins/test.config.js
test/configCases/source-map/dual-source-map-plugins/test.config.js
"use strict"; module.exports = { findBundle() { return ["bundle0.js", "bundle1.js", "bundle2.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/dual-source-map-plugins/entry3.js
test/configCases/source-map/dual-source-map-plugins/entry3.js
import fs from "fs"; import path from "path"; 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 dual sourcemap", async () => { import(/* webpac...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/dual-source-map-plugins/foo.js
test/configCases/source-map/dual-source-map-plugins/foo.js
export default "foo"
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/dual-source-map-plugins/webpack.config.js
test/configCases/source-map/dual-source-map-plugins/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration[]} */ module.exports = [ { devtool: false, entry: { bundle0: "./entry1.js" }, output: { filename: "[name].js" }, optimization: { runtimeChunk: true }, plugins: [ new webpack.SourceMapDev...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/source-map/dual-source-map-plugins/entry2.js
test/configCases/source-map/dual-source-map-plugins/entry2.js
import fs from "fs"; import path from "path"; 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 dual sourcemap", () => { expect(() => { getSo...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/node-prefix/index.js
test/configCases/node/node-prefix/index.js
import vm1 from "vm"; import vm2 from "node:vm"; it("should allow importing node builtin modules with the node: prefix", () => { expect(require("node:fs")).toBe(require("fs")); expect(require("node:path")).toBe(require("path")); expect(vm2).toBe(vm1); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/node-prefix/webpack.config.js
test/configCases/node/node-prefix/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409-2/index.js
test/configCases/node/issue-18409-2/index.js
import common from "./common"; import separate from "./separate"; it("should compile", () => { expect(common).toBe("common"); expect(separate).toBe("separate"); }); export default "main";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409-2/test.config.js
test/configCases/node/issue-18409-2/test.config.js
"use strict"; module.exports = { findBundle() { return ["./main.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409-2/common.js
test/configCases/node/issue-18409-2/common.js
export default "common";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409-2/webpack.config.js
test/configCases/node/issue-18409-2/webpack.config.js
"use strict"; /** @type {import("../../../../types").Configuration} */ module.exports = () => ({ devtool: false, mode: "development", entry: { main: { import: "./index.js", dependOn: "shared" }, shared: "./common.js" }, output: { filename: "[name].js" }, target: ["node"], optimization: { minimi...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409-2/separate.js
test/configCases/node/issue-18409-2/separate.js
export default "separate";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/prefix-in-runtime/test.filter.js
test/configCases/node/prefix-in-runtime/test.filter.js
"use strict"; const supportsNodePrefix = require("../../../helpers/supportsNodePrefix"); module.exports = () => supportsNodePrefix();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/prefix-in-runtime/index.js
test/configCases/node/prefix-in-runtime/index.js
import fs from "fs"; it(`should have/have not 'node:' prefix ${__filename}`, () => { const content = fs.readFileSync(__filename, "utf-8"); if (/bundle7\.js$/.test(__filename)) { expect(content).toContain("require(\"fs\");"); } else if (/(bundle1\.mjs|bundle3\.mjs|bundle6\.mjs)$/.test(__filename)) { expect(con...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/prefix-in-runtime/webpack.config.js
test/configCases/node/prefix-in-runtime/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = [ { target: "node", experiments: { outputModule: true }, output: { module: true, chunkFormat: "module" } }, { target: "node14.17", experiments: { outputModule: true }, output: { module: true, chunk...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/web-global/test.filter.js
test/configCases/node/web-global/test.filter.js
"use strict"; const supportsGlobalThis = require("../../../helpers/supportsGlobalThis"); module.exports = () => supportsGlobalThis();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/web-global/index.js
test/configCases/node/web-global/index.js
it("should use/not use globalThis", () => { expect(global).toBeDefined(); const stats = __STATS__.children[__STATS_I__]; expect(stats.modules.length).toBe(__STATS_I__ === 0 ? 2 : 1); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/web-global/webpack.config.js
test/configCases/node/web-global/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { target: "web", output: { environment: { globalThis: false } }, stats: { runtimeModules: true } }, { target: "web", output: { environment: { globalThis: true } }, stats: { runtimeModules: true } ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module/test.filter.js
test/configCases/node/filename-and-dirname-node-module/test.filter.js
"use strict"; const supportsNodePrefix = require("../../../helpers/supportsNodePrefix"); module.exports = () => supportsNodePrefix();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module/index.js
test/configCases/node/filename-and-dirname-node-module/index.js
import path from "path"; it("should use custom name", () => { expect(__dirname).toBe(__STATS__.outputPath); expect(__filename).toBe(path.join(__STATS__.outputPath, "./bundle0.mjs")); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module/test.config.js
test/configCases/node/filename-and-dirname-node-module/test.config.js
"use strict"; const path = require("path"); const { pathToFileURL } = require("url"); module.exports = { moduleScope(scope, options) { scope.custom = { url: pathToFileURL( path.join(options.output.path, "bundle0.mjs") ).toString() }; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module/webpack.config.js
test/configCases/node/filename-and-dirname-node-module/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node", experiments: { outputModule: true }, output: { module: true, importMetaName: "custom" }, node: { __filename: "node-module", __dirname: "node-module" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-universal/test.filter.js
test/configCases/node/filename-and-dirname-universal/test.filter.js
"use strict"; const supportsNodePrefix = require("../../../helpers/supportsNodePrefix"); module.exports = () => supportsNodePrefix();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-universal/index.js
test/configCases/node/filename-and-dirname-universal/index.js
const isBrowser = typeof globalThis.document !== 'undefined'; it("should work", () => { if (isBrowser) { expect(true).toBe(true); } else { // We can't handle `parser.hooks.typeof` and `parser.hooks.evaluateTypeof` for `import.meta.dirname` and `import.meta.filename` // because they may not exist when code is r...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-universal/test.config.js
test/configCases/node/filename-and-dirname-universal/test.config.js
"use strict"; module.exports = { moduleScope(scope, options) { if (options.name.includes("node")) { delete scope.window; delete scope.document; delete scope.self; } } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-universal/webpack.config.js
test/configCases/node/filename-and-dirname-universal/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = [ { name: "web", target: ["node", "web"], output: { module: true }, experiments: { outputModule: true } }, { name: "node", target: ["node", "web"], output: { module: true }, experiments: { outputModu...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/test.filter.js
test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/test.filter.js
"use strict"; const supportsNodePrefix = require("../../../helpers/supportsNodePrefix"); module.exports = () => supportsNodePrefix();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/index.js
test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/index.js
import path from "path"; import fs from "fs"; it("should use custom name", () => { expect(__dirname).toBe(__STATS__.outputPath); const bundleFile = path.join(__STATS__.outputPath, "./bundle0.mjs"); expect(__filename).toBe(bundleFile); const content = fs.readFileSync(bundleFile, "utf8"); expect(content.include...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/test.config.js
test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/test.config.js
"use strict"; const path = require("path"); const { pathToFileURL } = require("url"); let counter = 0; module.exports = { moduleScope(scope, options) { const bundleFilename = path.join( options.output.path, `bundle${counter++}.mjs` ); scope.custom = { url: pathToFileURL(bundleFilename).toString(), ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/webpack.config.js
test/configCases/node/filename-and-dirname-node-module-meta-dirname-and-filename/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { target: "node", experiments: { outputModule: true }, output: { module: true, importMetaName: "custom", environment: { importMetaDirnameAndFilename: true } }, node: { __filename: "node-module", __dirname: "node-m...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-eval-only/test.filter.js
test/configCases/node/filename-and-dirname-eval-only/test.filter.js
"use strict"; const supportsNodePrefix = require("../../../helpers/supportsNodePrefix"); module.exports = () => supportsNodePrefix();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-eval-only/index.js
test/configCases/node/filename-and-dirname-eval-only/index.js
import path from "path"; import { dirname as dirnameCjs, filename as filenameCjs } from "./cjs.js"; import { dirname as dirnameEsm, filename as filenameEsm } from "./esm.js"; it("should use custom name", () => { const stats = __STATS__.children[__STATS_I__]; if (typeof globalThis.document === "undefined") { expec...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-eval-only/esm.js
test/configCases/node/filename-and-dirname-eval-only/esm.js
const dirname = import.meta.dirname; const filename = import.meta.filename; export { dirname, filename };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-eval-only/cjs.js
test/configCases/node/filename-and-dirname-eval-only/cjs.js
const dirname = __dirname; const filename = __filename; module.exports = { dirname, filename };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname-eval-only/webpack.config.js
test/configCases/node/filename-and-dirname-eval-only/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { target: "node", node: { __filename: "eval-only", __dirname: "eval-only" } }, { target: "node", node: { __filename: "eval-only", __dirname: "eval-only" }, output: { module: true }, experiments: {...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/commonjs.js
test/configCases/node/filename-and-dirname/commonjs.js
const dirname = __dirname; const filename = __filename; module.exports = { dirname, filename }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/test.filter.js
test/configCases/node/filename-and-dirname/test.filter.js
"use strict"; const supportsNodePrefix = require("../../../helpers/supportsNodePrefix"); module.exports = () => supportsNodePrefix();
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/warnings.js
test/configCases/node/filename-and-dirname/warnings.js
"use strict"; module.exports = [ /"__dirname" has been used/, /"__filename" has been used/, /"import.meta.dirname" has been used/, /"import.meta.filename" has been used/, /"import.meta.dirname" has been used/, /"import.meta.filename" has been used/, /"__dirname" has been used/, /"__filename" has been used/, /...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/index.js
test/configCases/node/filename-and-dirname/index.js
import path from "path"; import { dirname as dirnameCommonJS, filename as filenameCommonJS } from "./commonjs.js" import { dirname as dirnameESM, filename as filenameESM } from "./esm.js" import { dirname as otherDirnameESM, filename as otherFilenameESM } from "./destructuring.js" const __dirname = "dirname"; const __...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/esm.js
test/configCases/node/filename-and-dirname/esm.js
const dirname = import.meta.dirname; const filename = import.meta.filename; export { dirname, filename }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/destructuring.js
test/configCases/node/filename-and-dirname/destructuring.js
const { dirname, filename } = import.meta; export { dirname, filename };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/esm-false.js
test/configCases/node/filename-and-dirname/esm-false.js
import path from "path"; import { dirname, filename } from "./esm.js" import { dirname as otherDirname, filename as otherFilename } from "./destructuring.js" it("should bundle", async () => { const __dirname = __STATS__.children[__STATS_I__].outputPath; const __filename = path.join(__STATS__.children[__STATS_I__].ou...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/webpack.config.js
test/configCases/node/filename-and-dirname/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {(boolean | "warn-mock" | "mock" | "node-module" | "eval-only")[]} */ const values = [true, "warn-mock", "mock", "node-module", "eval-only"]; /** @type {import("../../../../").Configuration[]} */ const config = []; // CommonJS config.push( ...values ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/filename-and-dirname/cjs-false.js
test/configCases/node/filename-and-dirname/cjs-false.js
const path = require("path"); const { dirname, filename } = require("./commonjs.js"); it("should bundle", async () => { const __dirname = __STATS__.children[__STATS_I__].outputPath; const __filename = path.join(__STATS__.children[__STATS_I__].outputPath, `./bundle${__STATS_I__}.js`); expect(dirname).toBe(__dirname...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/node/issue-18409/index.js
test/configCases/node/issue-18409/index.js
import common from "./common"; import separate from "./separate"; it("should compile", () => { expect(common).toBe("common"); expect(separate).toBe("separate"); }); export default "main";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false