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/externals/optional-externals-umd/index.js
test/configCases/externals/optional-externals-umd/index.js
it("should not fail on optional externals", function() { try { require("external"); } catch(e) { expect(e).toBeInstanceOf(Error); expect(e.code).toBe("MODULE_NOT_FOUND"); return; } throw new Error("It doesn't fail"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/optional-externals-umd/webpack.config.js
test/configCases/externals/optional-externals-umd/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { libraryTarget: "umd" }, externals: { external: "external" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/export-fn-cjs/index.js
test/configCases/externals/export-fn-cjs/index.js
it("Should work with export a function", function(done) { const myModule = require("module"); expect(typeof myModule).toBe("function"); expect(myModule.builtinModules).toBeDefined(); done() }); it("should work with export a object", function(done) { const myFs = require("fs"); expect(typeof myFs).toBe("object");...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/export-fn-cjs/webpack.config.js
test/configCases/externals/export-fn-cjs/webpack.config.js
"use strict"; /** @type {import("../../../../types").Configuration} */ module.exports = { externals: { module: "commonjs module", fs: "commonjs fs" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-commons-chunk/index.js
test/configCases/externals/externals-in-commons-chunk/index.js
it("should not move externals into the commons chunk", function() { var fs = require("fs"); var source1 = fs.readFileSync(__dirname + "/main.js", "utf-8"); var source2 = fs.readFileSync(__dirname + "/other.js", "utf-8"); var source3 = fs.readFileSync(__dirname + "/common.js", "utf-8"); expect(source...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-commons-chunk/test.config.js
test/configCases/externals/externals-in-commons-chunk/test.config.js
"use strict"; module.exports = { findBundle() { return ["./common.js", "./main.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-commons-chunk/other.js
test/configCases/externals/externals-in-commons-chunk/other.js
require("external"); require("external3"); require("./module");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-commons-chunk/webpack.config.js
test/configCases/externals/externals-in-commons-chunk/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { entry: { main: "./index", other: "./other" }, externals: { fs: "node-commonjs fs", external: "1+2", external2: "3+4", external3: "5+6" }, target: "web", output: { filename: "[name].js" }, node: { __dirname: fal...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-commons-chunk/module.js
test/configCases/externals/externals-in-commons-chunk/module.js
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-chunk/index.js
test/configCases/externals/externals-in-chunk/index.js
it("should move externals in chunks into entry chunk", function(done) { var fs = require("fs"); var source = fs.readFileSync(__filename, "utf-8"); expect(source).toMatch("1+" + (1+1)); expect(source).toMatch("3+" + (2+2)); expect(source).toMatch("5+" + (3+3)); import("./chunk").then(function(chunk) { expect(ch...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-chunk/chunk.js
test/configCases/externals/externals-in-chunk/chunk.js
exports.a = require("external"); exports.b = import("./chunk2");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-chunk/chunk2.js
test/configCases/externals/externals-in-chunk/chunk2.js
module.exports = require("external2");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-in-chunk/webpack.config.js
test/configCases/externals/externals-in-chunk/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { externals: { external: "1+2", external2: "3+4", external3: "5+6" }, node: { __dirname: false, __filename: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-umd-externals-umd2/index.js
test/configCases/externals/non-umd-externals-umd2/index.js
var fs = require("fs"); var path = require("path"); it("should correctly import a UMD2 external", function() { var external = require("external0"); expect(external).toBe("module 0"); }); it("should contain `require()` statements for the UMD2 external", function() { var source = fs.readFileSync(path.join(__dirname,...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-umd-externals-umd2/test.config.js
test/configCases/externals/non-umd-externals-umd2/test.config.js
"use strict"; module.exports = { modules: { external0: "module 0" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-umd-externals-umd2/webpack.config.js
test/configCases/externals/non-umd-externals-umd2/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { libraryTarget: "umd2" }, externals: { external0: "external0", external1: "var 'abc'" }, node: { __dirname: false, __filename: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/harmony/index.js
test/configCases/externals/harmony/index.js
import external from "external"; it("should harmony import a dependency", function() { expect(external).toBe("abc"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/harmony/webpack.config.js
test/configCases/externals/harmony/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { externals: { external: "var 'abc'" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/concatenated/index.js
test/configCases/externals/concatenated/index.js
import externalValue, { named as externalValueNamed } from "externalValue"; it("should harmony import a external value", function () { expect(externalValue).toBe("abc"); expect(externalValueNamed).toBe(undefined); }); import externalObject, { named as externalObjectNamed } from "externalObject"; it("should harmony...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/concatenated/webpack.config.js
test/configCases/externals/concatenated/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { externals: { externalValue: "var 'abc'", externalObject: "var { default: 'default', named: 'named' }", externalEsModule: "var { __esModule: true, default: 'default', named: 'named' }" }, optimization: { concatenateModule...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-amd-externals-amd/index.js
test/configCases/externals/non-amd-externals-amd/index.js
var fs = require("fs"); var path = require("path"); var dependencyArrayRegex = /define\((\[[^\]]*\]), (function)?\(/; var source = fs.readFileSync(path.join(__dirname, "bundle0.js"), "utf-8"); var [, deps] = dependencyArrayRegex.exec(source); it("should correctly import a AMD external", function() { var external = r...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-amd-externals-amd/test.config.js
test/configCases/externals/non-amd-externals-amd/test.config.js
"use strict"; module.exports = { modules: { external0: "module 0" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-amd-externals-amd/webpack.config.js
test/configCases/externals/non-amd-externals-amd/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { output: { libraryTarget: "amd" }, externals: { external0: "external0", external1: "var 'abc'" }, node: { __dirname: false, __filename: false }, target: "web", externalsPreset...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-system/index.js
test/configCases/externals/externals-system/index.js
import external3Default, { namedThing } from "external3"; import "external4"; /* This test verifies that webpack externals are properly indicated as dependencies to System. * Also that when System provides the external variables to webpack that the variables get plumbed * through correctly and are usable by the webp...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-system/test.config.js
test/configCases/externals/externals-system/test.config.js
"use strict"; const System = require("../../../helpers/fakeSystem"); module.exports = { beforeExecute: () => { System.init({ external1: { default: "the external1 value" }, external2: { default: "the external2 value" }, external3: { default: "the external3 default export", namedThing:...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-system/webpack.config.js
test/configCases/externals/externals-system/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { libraryTarget: "system" }, externals: { external1: "external1", external2: "external2", external3: "external3", external4: "external4", external5: "external5" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-system/reexport-external.js
test/configCases/externals/externals-system/reexport-external.js
export * from "external5"; export { default } from "external5";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-umd-externals-umd/index.js
test/configCases/externals/non-umd-externals-umd/index.js
var fs = require("fs"); var path = require("path"); it("should correctly import a UMD external", function() { var external = require("external0"); expect(external).toBe("module 0"); }); it("should contain `require()` statements for the UMD external", function() { var source = fs.readFileSync(path.join(__dirname, "...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-umd-externals-umd/test.config.js
test/configCases/externals/non-umd-externals-umd/test.config.js
"use strict"; module.exports = { modules: { external0: "module 0" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/non-umd-externals-umd/webpack.config.js
test/configCases/externals/non-umd-externals-umd/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { libraryTarget: "umd" }, externals: { external0: "external0", external1: "var 'abc'" }, node: { __dirname: false, __filename: false } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/this/index.js
test/configCases/externals/this/index.js
afterEach(done => { (function() { delete this.EXTERNAL_TEST_GLOBAL; })(); done(); }); it("should import an external value assigned to global this", function() { (function() { this.EXTERNAL_TEST_GLOBAL = 42; })(); // eslint-disable-next-line n/no-missing-require const result = require("external"); expect(result)....
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/this/webpack.config.js
test/configCases/externals/this/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { concatenateModules: true }, externals: { external: "this EXTERNAL_TEST_GLOBAL" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve-callback/index.js
test/configCases/externals/resolve-callback/index.js
it("should allow functions as externals with promise and resolver", function () { const result = require("external"); expect(result).toMatch(/^[a-z]:\\|\//i); expect(result).toMatch(/resolve-callback.node_modules.external\.js$/); const result1 = require("external-false"); expect(JSON.stringify(result1)).toBe('{}')...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve-callback/webpack.config.js
test/configCases/externals/resolve-callback/webpack.config.js
"use strict"; /** @typedef {import("enhanced-resolve").ResolveRequest} ResolveRequest */ /** @typedef {import("../../../../").ExternalItemFunctionData} ExternalItemFunctionData */ /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { concatenateModules: true }, externals: [ ({ ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve-callback/node_modules/external-false.js
test/configCases/externals/resolve-callback/node_modules/external-false.js
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve-callback/node_modules/external.js
test/configCases/externals/resolve-callback/node_modules/external.js
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve/index.js
test/configCases/externals/resolve/index.js
it("should allow functions as externals with promise and resolver", function () { const result = require("external"); expect(result).toMatch(/^[a-z]:\\|\//i); expect(result).toMatch(/resolve.node_modules.external\.js$/); const result2 = require("external-promise"); expect(result2).toMatch(/^[a-z]:\\|\//i); expect...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve/webpack.config.js
test/configCases/externals/resolve/webpack.config.js
"use strict"; /** @typedef {import("../../../../").ExternalItemFunctionData} ExternalItemFunctionData */ /** @typedef {import("../../../../").ExternalItemFunctionPromise} ExternalItemFunctionPromise */ /** @typedef {import("../../../../").ExternalItemFunctionDataGetResolve} ExternalItemFunctionDataGetResolve */ /** @t...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve/node_modules/external-promise.js
test/configCases/externals/resolve/node_modules/external-promise.js
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/resolve/node_modules/external.js
test/configCases/externals/resolve/node_modules/external.js
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/node-require/index.js
test/configCases/externals/node-require/index.js
function getMajorVersion(versionStr) { const match = versionStr.match(/^v?(\d+)\./); if (match) { return parseInt(match[1], 10); } return null; } it("should not fail on optional externals", function() { if (getMajorVersion(NODE_VERSION) <= 12) { const external = require("external"); // The behavior of jes...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/node-require/webpack.config.js
test/configCases/externals/node-require/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../types").Configuration} */ module.exports = { output: { libraryTarget: "commonjs2" }, externals: { external: ["webpack", "version"] }, plugins: [ new webpack.DefinePlugin({ NODE_VERSION: JSON.stringify(process.version),...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/optional-externals-umd2/index.js
test/configCases/externals/optional-externals-umd2/index.js
it("should not fail on optional externals", function() { try { require("external"); } catch(e) { expect(e).toBeInstanceOf(Error); expect(e.code).toBe("MODULE_NOT_FOUND"); return; } throw new Error("It doesn't fail"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/optional-externals-umd2/webpack.config.js
test/configCases/externals/optional-externals-umd2/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { libraryTarget: "umd2" }, externals: { external: "external" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/async-externals/index.js
test/configCases/externals/async-externals/index.js
import value from "promise-external"; import value2 from "module-promise-external"; import value3 from "object-promise-external"; import request from "import-external"; import request2 from "module-import-external"; import "./module.mjs"; it("should allow async externals", () => { expect(value).toBe(42); expect(valu...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/async-externals/webpack.config.js
test/configCases/externals/async-externals/webpack.config.js
"use strict"; module.exports = { target: ["web", "es2020"], output: { libraryTarget: "commonjs-module", importFunctionName: "((name) => Promise.resolve({ request: name }))" }, externals: { "promise-external": "promise new Promise(resolve => setTimeout(() => resolve(42), 100))", "module-promise-external"...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-array/index.js
test/configCases/externals/externals-array/index.js
it("should not fail on optional externals", function() { const external = require("external"); expect(external).toBe(EXPECTED); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-array/webpack.config.js
test/configCases/externals/externals-array/webpack.config.js
"use strict"; const webpack = require("../../../../"); /** @type {import("../../../../types").Configuration[]} */ module.exports = [ { output: { libraryTarget: "global" }, externals: { external: ["process", "version"] }, plugins: [ new webpack.DefinePlugin({ EXPECTED: JSON.stringify(process.ve...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-system-custom/index.js
test/configCases/externals/externals-system-custom/index.js
// This test verifies that the System.register context is made available to webpack bundles it("should correctly handle externals of different type", function() { expect(require("rootExt")).toEqual("works"); expect(require("varExt")).toEqual("works"); expect(require("windowExt")).toEqual("works"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-system-custom/test.config.js
test/configCases/externals/externals-system-custom/test.config.js
"use strict"; const System = require("../../../helpers/fakeSystem"); module.exports = { target: "web", beforeExecute: () => { System.init(); }, moduleScope(scope) { scope.window.windowExt = "works"; scope.rootExt = "works"; scope.varExt = "works"; scope.System = System; }, afterExecute: () => { Syst...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/externals-system-custom/webpack.config.js
test/configCases/externals/externals-system-custom/webpack.config.js
"use strict"; /** @type {import("../../../../types").Configuration} */ module.exports = { output: { libraryTarget: "system" }, target: "web", node: { __dirname: false, __filename: false }, externals: { rootExt: "root rootExt", varExt: "var varExt", windowExt: "window windowExt" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/optional-externals-umd2-mixed/index.js
test/configCases/externals/optional-externals-umd2-mixed/index.js
it("should not fail on optional externals", function() { require("external2"); try { require("external"); } catch(e) { expect(e).toBeInstanceOf(Error); expect(e.code).toBe("MODULE_NOT_FOUND"); return; } throw new Error("It doesn't fail"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/optional-externals-umd2-mixed/webpack.config.js
test/configCases/externals/optional-externals-umd2-mixed/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { output: { libraryTarget: "umd2" }, externals: { external: "external", external2: "fs" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-attributes/test.filter.js
test/configCases/externals/import-attributes/test.filter.js
"use strict"; module.exports = () => /^v2[2-9]/.test(process.version);
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-attributes/index.js
test/configCases/externals/import-attributes/index.js
import * as staticPkg from "./static-package.json" with { type: "json" }; import * as staticPkgStr from "./static-package-str.json" with { "type": "json" }; import * as staticPkgModuleImport from "./static-package-module-import.json" with { "type": "json" }; it("should allow async externals", async () => { expect(sta...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-attributes/webpack.config.js
test/configCases/externals/import-attributes/webpack.config.js
"use strict"; const fs = require("fs"); const path = require("path"); const { Compilation, sources: { RawSource } } = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { output: { library: { type: "module" } }, target: ["web", "es2020"], experiments: { output...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-attributes/re-export.js
test/configCases/externals/import-attributes/re-export.js
export * from "./re-export.json" with { type: "json" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/dynamic-reexports/index.js
test/configCases/externals/dynamic-reexports/index.js
import * as ns from './lib' it('should have correect reexport', () => { expect(ns).toHaveProperty('readFile'); expect(ns).toHaveProperty('resolve'); expect(typeof ns.sep).toBe('string'); })
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/dynamic-reexports/webpack.config.js
test/configCases/externals/dynamic-reexports/webpack.config.js
"use strict"; module.exports = { target: ["node"], output: { environment: { arrowFunction: true, const: false } } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/dynamic-reexports/lib.js
test/configCases/externals/dynamic-reexports/lib.js
// 2 external modules, the external module exportsType is unkown // so the exports of current module can only be known at runtime export * from 'path' export * from 'fs'
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-assertion/test.filter.js
test/configCases/externals/import-assertion/test.filter.js
"use strict"; module.exports = () => /^v(?:1[6-9]|21)/.test(process.version);
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-assertion/index.js
test/configCases/externals/import-assertion/index.js
import * as staticPkg from "./static-package.json" assert { type: "json" }; import * as staticPkgStr from "./static-package-str.json" assert { "type": "json" }; import * as staticPkgModuleImport from "./static-package-module-import.json" assert { type: "json" }; it("should allow async externals", async () => { expect...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-assertion/webpack.config.js
test/configCases/externals/import-assertion/webpack.config.js
"use strict"; const fs = require("fs"); const path = require("path"); const { Compilation, sources: { RawSource } } = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = { output: { library: { type: "module" } }, target: ["web", "es2020"], experiments: { output...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/import-assertion/re-export.js
test/configCases/externals/import-assertion/re-export.js
export * from "./re-export.json" assert { type: "json" };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/concatenated-module/test.filter.js
test/configCases/externals/concatenated-module/test.filter.js
"use strict"; module.exports = () => !process.version.startsWith("v10.") && !process.version.startsWith("v12.");
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/concatenated-module/index.js
test/configCases/externals/concatenated-module/index.js
import fs1 from "fs"; import fs2 from "module-fs"; import fsPromises1 from "fs-promises"; import fsPromises2 from "module-fs-promises"; import path1 from "path"; import path2 from "module-path"; import url1 from "url"; import url2 from "module-import-url"; it("should be possible to import multiple module externals", (...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/concatenated-module/webpack.config.js
test/configCases/externals/concatenated-module/webpack.config.js
"use strict"; /** @type {(variant: boolean) => import("../../../../").Configuration} */ const config = (o) => ({ externals: { "module-fs": o ? "module fs" : "module fs/promises", fs: o ? "node-commonjs fs" : "node-commonjs fs/promises", "module-fs-promises": o ? ["module fs", "promises"] : "module fs/promises",...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/prefer-provided-over-built-in/index.js
test/configCases/externals/prefer-provided-over-built-in/index.js
import http from "http"; it("prefer provided over built-in", () => { expect(http).toBe(3); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/externals/prefer-provided-over-built-in/webpack.config.js
test/configCases/externals/prefer-provided-over-built-in/webpack.config.js
"use strict"; module.exports = { target: "node", externals: { http: "1+2" } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-destructuring-assignment/module3.js
test/configCases/mangle/mangle-with-destructuring-assignment/module3.js
export const aaa = "a"; export const bbb = "b";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-destructuring-assignment/reexport.js
test/configCases/mangle/mangle-with-destructuring-assignment/reexport.js
export * as obj3 from "./module2" export const obj3CanMangle = __webpack_exports_info__.obj3.canMangle; import * as reexport2 from "./reexport2?side-effects" export const obj4 = { nested: reexport2 } export const obj4CanMangle = __webpack_exports_info__.reexport2.canMangle;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-destructuring-assignment/reexport2.js
test/configCases/mangle/mangle-with-destructuring-assignment/reexport2.js
export * as obj5 from "./module3" export const obj5CanMangle = __webpack_exports_info__.obj5.canMangle;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-destructuring-assignment/index.js
test/configCases/mangle/mangle-with-destructuring-assignment/index.js
import path from "path"; import * as module from "./module"; import { obj3, obj3CanMangle, obj4, obj4CanMangle } from "./reexport?side-effects" // enable side effects to ensure reexport is not skipped import data from "./data.json"; import data2 from "./data.json?2"; it("should mangle export when destructuring module"...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-destructuring-assignment/webpack.config.js
test/configCases/mangle/mangle-with-destructuring-assignment/webpack.config.js
"use strict"; /** @typedef {import("webpack").CodeGenerationResults} CodeGenerationResults */ /** @typedef {import("webpack-sources").Source} Source */ /** @type {import("../../../../").Configuration} */ module.exports = { module: { rules: [ { resourceQuery: /side-effects/, sideEffects: true } ] }...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-destructuring-assignment/module2.js
test/configCases/mangle/mangle-with-destructuring-assignment/module2.js
export const aaa = "a"; export const bbb = "b";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-destructuring-assignment/module.js
test/configCases/mangle/mangle-with-destructuring-assignment/module.js
export const aaa = "aaa"; export const aaaCanMangle = __webpack_exports_info__.aaa.canMangle; export const obj = { a: "a", b: "b" } export const objCanMangle = __webpack_exports_info__.obj.canMangle; export const obj2 = { a: "a", b: "b" } export const obj2CanMangle = __webpack_exports_info__.obj2.canMangle; export d...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-object-prop/commonjs.js
test/configCases/mangle/mangle-with-object-prop/commonjs.js
exports.abc = "abc"; exports.def = "def"; exports.setToString = () => { exports.toString = () => "toString"; }; exports.moduleId = module.id; exports.a = "single char"; exports["="] = "single char non-identifier"; exports.$1 = "double char"; exports.__1 = "3 chars";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-object-prop/index.js
test/configCases/mangle/mangle-with-object-prop/index.js
import { moduleId, setToString, toString, abc, a, $1, __1 } from "./module"; const moduleId2 = require("./commonjs").moduleId; const toString2 = require("./commonjs").toString; const setToString2 = require("./commonjs").setToString; const abc2 = require("./commonjs").abc; const a2 = require("./commonjs").a; const equal...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-object-prop/test.config.js
test/configCases/mangle/mangle-with-object-prop/test.config.js
"use strict"; module.exports = { findBundle() { return ["./deterministic.js", "./size.js"]; } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-object-prop/webpack.config.js
test/configCases/mangle/mangle-with-object-prop/webpack.config.js
"use strict"; const { DefinePlugin } = require("../../../../"); /** @type {import("../../../../").Configuration} */ module.exports = [ { output: { filename: "deterministic.js" }, optimization: { mangleExports: true, usedExports: true, providedExports: true }, plugins: [ new DefinePlugin({ ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-object-prop/module.js
test/configCases/mangle/mangle-with-object-prop/module.js
export const abc = "abc"; export const def = "def"; export let toString; export const setToString = () => { toString = () => "toString"; }; export const moduleId = module.id; export const a = "single char"; export const $1 = "double char"; export const __1 = "3 chars";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-re-export-as-default/index.js
test/configCases/mangle/mangle-with-re-export-as-default/index.js
import namespace from "./re-exports"; it("should mangle exports imported", () => { const { foo } = namespace; expect(foo).toBe('foo') });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-re-export-as-default/re-exports.js
test/configCases/mangle/mangle-with-re-export-as-default/re-exports.js
import * as namespace from './module'; export { namespace as default };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-re-export-as-default/webpack.config.js
test/configCases/mangle/mangle-with-re-export-as-default/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { mangleExports: true, usedExports: true, providedExports: true, sideEffects: false // disable reexports optimization } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/mangle-with-re-export-as-default/module.js
test/configCases/mangle/mangle-with-re-export-as-default/module.js
export const foo = 'foo';
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/exports-info-can-mangle/index.js
test/configCases/mangle/exports-info-can-mangle/index.js
import { aaa, aaaCanMangle } from "./a"; import * as b from "./b" import { ca, cb, caCanMangle, cbCanMangle, ca_aaaCanMangle, cb_bbbCanMangle } from "./c"; it("__webpack_exports_info__.xxx.canMangle should be correct", () => { expect(aaa).toBe("aaa"); expect(aaaCanMangle).toBe(true); const { bbb, bbbCanMangle } = ...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/exports-info-can-mangle/b.js
test/configCases/mangle/exports-info-can-mangle/b.js
export const bbb = "bbb"; export const bbbCanMangle = __webpack_exports_info__.bbb.canMangle;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/exports-info-can-mangle/webpack.config.js
test/configCases/mangle/exports-info-can-mangle/webpack.config.js
"use strict"; /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { mangleExports: true, usedExports: true, providedExports: true } };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/exports-info-can-mangle/c.js
test/configCases/mangle/exports-info-can-mangle/c.js
export * as ca from "./a"; export * as cb from "./b"; export const caCanMangle = __webpack_exports_info__.ca.canMangle; export const cbCanMangle = __webpack_exports_info__.cb.canMangle; export const ca_aaaCanMangle = __webpack_exports_info__.ca.aaa.canMangle; export const cb_bbbCanMangle = __webpack_exports_info__.cb.b...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/mangle/exports-info-can-mangle/a.js
test/configCases/mangle/exports-info-can-mangle/a.js
export const aaa = "aaa"; export const aaaCanMangle = __webpack_exports_info__.aaa.canMangle;
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/reference.js
test/configCases/deep-scope-analysis/remove-export-scope-hoisting/reference.js
export var used = "used"; export var unused = "unused";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/index.js
test/configCases/deep-scope-analysis/remove-export-scope-hoisting/index.js
import { test, unused } from "./module"; it("should run the test", () => { expect(test()).toEqual({ used: "used", unused: undefined }); expect(unused).toEqual(undefined); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/webpack.config.js
test/configCases/deep-scope-analysis/remove-export-scope-hoisting/webpack.config.js
"use strict"; /** @typedef {import("../../../../").Compilation} Compilation */ /** @typedef {import("../../../../").Module} Module */ /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { usedExports: true, concatenateModules: true, sideEffects: false }, plugins: [ function...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/module.js
test/configCases/deep-scope-analysis/remove-export-scope-hoisting/module.js
import { used, unused } from "./reference"; export function test() { return { used, unused }; } export { unused }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export/reference.js
test/configCases/deep-scope-analysis/remove-export/reference.js
export var used = "used"; export var unused = "unused";
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export/index.js
test/configCases/deep-scope-analysis/remove-export/index.js
import { test, unused } from "./module"; it("should run the test", () => { expect(test()).toEqual({ used: "used", unused: undefined }); expect(unused).toEqual(undefined); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export/webpack.config.js
test/configCases/deep-scope-analysis/remove-export/webpack.config.js
"use strict"; /** @typedef {import("../../../../").Compilation} Compilation */ /** @typedef {import("../../../../").Module} Module */ /** @type {import("../../../../").Configuration} */ module.exports = { optimization: { usedExports: true, concatenateModules: false, sideEffects: false }, plugins: [ functio...
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/deep-scope-analysis/remove-export/module.js
test/configCases/deep-scope-analysis/remove-export/module.js
import { used, unused } from "./reference"; export function test() { return { used, unused }; } export { unused }
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/loaders/generate-ident/loader1.js
test/configCases/loaders/generate-ident/loader1.js
/** @type {import("../../../../").PitchLoaderDefinitionFunction} */ module.exports.pitch = function (remainingRequest) { return ( "module.exports = require(" + JSON.stringify("!!" + remainingRequest) + ");" ); };
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false
webpack/webpack
https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/test/configCases/loaders/generate-ident/index.js
test/configCases/loaders/generate-ident/index.js
it("should correctly pass complex query object with remaining request", function() { expect(require("./a")).toBe("ok"); expect(require("./b")).toBe("maybe"); expect(require("./c")).toBe("yes"); expect(require("./d")).toBe("ok"); });
javascript
MIT
d2a124db548cad6e84dffd93b502a4e74bfe2b6a
2026-01-04T14:56:49.698101Z
false