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/examples/common-chunk-grandchildren/pageA.js | examples/common-chunk-grandchildren/pageA.js | var reusableComponent = require("./reusableComponent");
module.exports = function() {
console.log("Page A");
reusableComponent();
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/common-chunk-grandchildren/build.js | examples/common-chunk-grandchildren/build.js | global.NO_TARGET_ARGS = true;
require("../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/common-chunk-grandchildren/webpack.config.js | examples/common-chunk-grandchildren/webpack.config.js | "use strict";
const path = require("path");
/** @type {import("webpack").Configuration} */
const config = {
// mode: "development" || "production",
entry: {
main: ["./example.js"]
},
optimization: {
splitChunks: {
minSize: 0 // This example is too small, in practice you can use the defaults
},
chunkIds... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/common-chunk-grandchildren/reusableComponent.js | examples/common-chunk-grandchildren/reusableComponent.js | module.exports = function() {
console.log("reusable Component");
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/common-chunk-grandchildren/example.js | examples/common-chunk-grandchildren/example.js | var main = function() {
console.log("Main class");
require.ensure([], () => {
const page = require("./pageA");
page();
});
require.ensure([], () => {
const page = require("./pageB");
page();
});
};
main();
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/common-chunk-grandchildren/pageC.js | examples/common-chunk-grandchildren/pageC.js | var reusableComponent = require("./reusableComponent");
module.exports = function() {
console.log("Page C");
reusableComponent();
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/explicit-vendor-chunk/vendor.js | examples/explicit-vendor-chunk/vendor.js | module.exports = "Vendor"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/explicit-vendor-chunk/pageB.js | examples/explicit-vendor-chunk/pageB.js | console.log(require("./vendor2"));
module.exports = "pageB"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/explicit-vendor-chunk/pageA.js | examples/explicit-vendor-chunk/pageA.js | console.log(require("./vendor"));
module.exports = "pageA"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/explicit-vendor-chunk/build.js | examples/explicit-vendor-chunk/build.js | global.NO_TARGET_ARGS = true;
require("../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/explicit-vendor-chunk/vendor2.js | examples/explicit-vendor-chunk/vendor2.js | module.exports = "Vendor2"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/explicit-vendor-chunk/webpack.config.js | examples/explicit-vendor-chunk/webpack.config.js | "use strict";
const path = require("path");
const webpack = require("../../");
/** @type {import("webpack").Configuration[]} */
const config = [
{
name: "vendor",
// mode: "development" || "production",
entry: ["./vendor", "./vendor2"],
output: {
path: path.resolve(__dirname, "dist"),
filename: "vendor... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/explicit-vendor-chunk/pageC.js | examples/explicit-vendor-chunk/pageC.js | module.exports = "pageC"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/build.js | examples/reexport-components/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/webpack.config.js | examples/reexport-components/webpack.config.js | "use strict";
const path = require("path");
/** @type {import("webpack").Configuration} */
const config = {
module: {
rules: [
{
test: /\.js$/,
include: [path.resolve(__dirname, ".")],
use: {
loader: "babel-loader",
options: {
presets: ["@babel/react"]
}
}
}
]
},
opti... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/example.js | examples/reexport-components/example.js | // insert router here
import(`./pages/${page}`);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/pages/Dashboard.js | examples/reexport-components/pages/Dashboard.js | import { Button, Checkbox } from "../components";
const Dashboard = () => {
return (
<>
<Button />
<Checkbox />
</>
);
};
export default Dashboard;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/pages/Login.js | examples/reexport-components/pages/Login.js | import { Button, Dialog } from "../components";
const Login = () => {
return (
<>
<Button />
<Dialog />
</>
);
};
export default Login;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/components/index.js | examples/reexport-components/components/index.js | export { default as Button } from "./Button";
export * from "./Checkbox";
export { default as Dialog } from "./Dialog";
export { DialogInline } from "./DialogInline";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/components/Button.js | examples/reexport-components/components/Button.js | const Button = () => {
return <button />;
};
export { Button as default };
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/components/DialogInline.js | examples/reexport-components/components/DialogInline.js | const DialogInline = ({ children }) => {
return <dialog>{children}</dialog>;
};
export { DialogInline };
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/components/Checkbox.js | examples/reexport-components/components/Checkbox.js | const Checkbox = () => {
return <input type="checkbox" />;
};
export { Checkbox };
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/reexport-components/components/Dialog.js | examples/reexport-components/components/Dialog.js | const Dialog = ({ children }) => {
return <dialog>{children}</dialog>;
};
export default Dialog;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/page1.js | examples/code-splitting-depend-on-advanced/page1.js | import isomorphicFetch from "isomorphic-fetch";
import react from "react";
import reactDOM from "react-dom";
console.log(isomorphicFetch, react, reactDOM);
import("./lazy");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/build.js | examples/code-splitting-depend-on-advanced/build.js | global.NO_TARGET_ARGS = true;
require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/app.js | examples/code-splitting-depend-on-advanced/app.js | import isomorphicFetch from "isomorphic-fetch";
import lodash from "lodash";
console.log(isomorphicFetch, lodash);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/lazy.js | examples/code-splitting-depend-on-advanced/lazy.js | import lodash from "lodash";
import propTypes from "prop-types";
console.log(lodash, propTypes);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/webpack.config.js | examples/code-splitting-depend-on-advanced/webpack.config.js | "use strict";
/** @type {import("webpack").Configuration} */
const config = {
entry: {
app: { import: "./app.js", dependOn: ["other-vendors"] },
page1: { import: "./page1.js", dependOn: ["app", "react-vendors"] },
"react-vendors": ["react", "react-dom", "prop-types"],
"other-vendors": "./other-vendors"
},
o... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/other-vendors.js | examples/code-splitting-depend-on-advanced/other-vendors.js | import lodash from "lodash";
import isomorphicFetch from "isomorphic-fetch";
// Additional initializations
console.log(lodash, isomorphicFetch);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/node_modules/lodash.js | examples/code-splitting-depend-on-advanced/node_modules/lodash.js | module.exports = 'lodash';
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/node_modules/prop-types.js | examples/code-splitting-depend-on-advanced/node_modules/prop-types.js | module.exports = 'prop-types';
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/node_modules/react.js | examples/code-splitting-depend-on-advanced/node_modules/react.js | module.exports = 'react';
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch.js | examples/code-splitting-depend-on-advanced/node_modules/isomorphic-fetch.js | module.exports = "isomorphic-fetch";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitting-depend-on-advanced/node_modules/react-dom.js | examples/code-splitting-depend-on-advanced/node_modules/react-dom.js | module.exports = 'react-dom';
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/module-library/methods.js | examples/module-library/methods.js | export { reset as resetCounter } from "./counter";
export const print = value => console.log(value);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/module-library/counter.js | examples/module-library/counter.js | export let value = 0;
export function increment() {
value++;
}
export function decrement() {
value--;
}
export function reset() {
value = 0;
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/module-library/build.js | examples/module-library/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/module-library/webpack.config.js | examples/module-library/webpack.config.js | "use strict";
/** @type {import("webpack").Configuration} */
const config = {
output: {
module: true,
library: {
type: "module"
}
},
optimization: {
concatenateModules: true
},
experiments: {
outputModule: true
}
};
module.exports = config;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/module-library/example.js | examples/module-library/example.js | export * from "./counter";
export * from "./methods";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/virtual-modules/test.filter.js | examples/virtual-modules/test.filter.js | "use strict";
module.exports = () => {
const nodeVersionMajor = Number.parseInt(
process.version.slice(1).split(".")[0],
10
);
return nodeVersionMajor >= 14;
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/virtual-modules/build.js | examples/virtual-modules/build.js | require("../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/virtual-modules/webpack.config.js | examples/virtual-modules/webpack.config.js | "use strict";
const fs = require("fs");
const path = require("path");
const webpack = require("../../");
const routesPath = path.join(__dirname, "./routes");
const VERSION = "1.0.0";
/** @type {(env: "development" | "production") => import("webpack").Configuration} */
const config = (env = "development") => ({
mod... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/virtual-modules/example.js | examples/virtual-modules/example.js | import { msg } from "virtual:my-module";
import myAsyncMessage from "virtual:my-async-module";
import { version } from "virtual:build-info";
import json from "virtual:my-json-modules";
import value from "virtual:my-typescript-module";
console.log(msg); // Output `from virtual module`
console.log(myAsyncMessage); // Ou... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/virtual-modules/code.js | examples/virtual-modules/code.js | const first = "first";
const second = "second";
export { first, second };
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/virtual-modules/routes/b.js | examples/virtual-modules/routes/b.js | export default "b";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/virtual-modules/routes/a.js | examples/virtual-modules/routes/a.js | export default "a";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-entry-only/b.js | examples/dll-entry-only/b.js | // module b
export function b() {
return "b";
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-entry-only/build.js | examples/dll-entry-only/build.js | global.NO_TARGET_ARGS = true;
require("../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-entry-only/cjs.js | examples/dll-entry-only/cjs.js | // module cjs (commonjs)
exports.c = "c";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-entry-only/webpack.config.js | examples/dll-entry-only/webpack.config.js | "use strict";
const path = require("path");
const webpack = require("../../");
/** @type {import("webpack").Configuration} */
const config = {
// mode: "development" || "production",
entry: {
dll: ["./example"]
},
output: {
path: path.join(__dirname, "dist"),
filename: "[name].js",
library: "[name]_[fullh... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-entry-only/example.js | examples/dll-entry-only/example.js | export { a, b } from "./a";
export { c } from "./cjs";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-entry-only/a.js | examples/dll-entry-only/a.js | // module a
export var a = "a";
export * from "./b";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony-unused/abc.js | examples/harmony-unused/abc.js | export function a() { console.log("a"); }
export function b() { console.log("b"); }
export function c() { console.log("c"); }
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony-unused/library.js | examples/harmony-unused/library.js | export { a, b, c } from "./abc";
export { add as reexportedAdd, multiply as reexportedMultiply } from "./math"; | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony-unused/math.js | examples/harmony-unused/math.js | export function add() {
var sum = 0, i = 0, args = arguments, l = args.length;
while (i < l) {
sum += args[i++];
}
return sum;
}
export function multiply() {
var product = 1, i = 0, args = arguments, l = args.length;
while (i < l) {
product *= args[i++];
}
return product;
}
export function list() {
retur... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony-unused/build.js | examples/harmony-unused/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony-unused/webpack.config.js | examples/harmony-unused/webpack.config.js | "use strict";
/** @type {import("webpack").Configuration} */
const config = {
// mode: "development" || "production",
optimization: {
concatenateModules: false
}
};
module.exports = config;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony-unused/example.js | examples/harmony-unused/example.js | import { add } from './math';
import * as library from "./library";
add(1, 2);
library.reexportedMultiply(1, 2);
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/manifest-plugin/build.js | examples/manifest-plugin/build.js | require("../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/manifest-plugin/async.js | examples/manifest-plugin/async.js | export default "value";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/manifest-plugin/webpack.config.js | examples/manifest-plugin/webpack.config.js | "use strict";
// @ts-expect-error no types for yamljs
const YAML = require("yamljs");
const webpack = require("../../");
/** @type {import("webpack").Configuration} */
const config = {
devtool: "source-map",
output: {
chunkFilename: "[name].[contenthash].js"
},
optimization: {
chunkIds: "named" // To keep fil... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/manifest-plugin/example.js | examples/manifest-plugin/example.js | import fooURL from "./foo.txt";
const barURL = new URL("./bar.txt", import.meta.url);
async function loadAsync() {
return import("./async.js");
}
await loadAsync();
export default [fooURL, barURL];
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony/increment.js | examples/harmony/increment.js | import { add } from './math';
export function increment(val) {
return add(val, 1);
};
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony/async-loaded.js | examples/harmony/async-loaded.js | export var answer = 42;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony/math.js | examples/harmony/math.js | export function add() {
var sum = 0, i = 0, args = arguments, l = args.length;
while (i < l) {
sum += args[i++];
}
return sum;
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony/build.js | examples/harmony/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony/webpack.config.js | examples/harmony/webpack.config.js | "use strict";
/** @type {import("webpack").Configuration} */
const config = {
optimization: {
chunkIds: "deterministic" // To keep filename consistent between different modes (for example building only)
}
};
module.exports = config;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/harmony/example.js | examples/harmony/example.js | import { increment as inc } from './increment';
var a = 1;
inc(a); // 2
// async loading
import("./async-loaded").then(function(asyncLoaded) {
console.log(asyncLoaded);
});
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitted-require.context-amd/build.js | examples/code-splitted-require.context-amd/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitted-require.context-amd/webpack.config.js | examples/code-splitted-require.context-amd/webpack.config.js | "use strict";
/** @type {import("webpack").Configuration} */
const config = {
optimization: {
chunkIds: "named" // To keep filename consistent between different modes (for example building only)
}
};
module.exports = config;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/code-splitted-require.context-amd/example.js | examples/code-splitted-require.context-amd/example.js | function getTemplate(templateName, callback) {
require(["../require.context/templates/"+templateName], function(tmpl) {
callback(tmpl());
});
}
getTemplate("a", function(a) {
console.log(a);
});
getTemplate("b", function(b) {
console.log(b);
}); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/require.resolve/build.js | examples/require.resolve/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/require.resolve/example.js | examples/require.resolve/example.js | var a = require("./a");
// get module id
var aId = require.resolve("./a.js");
// clear module in require.cache
delete require.cache[aId];
// require module again, it should be reexecuted
var a2 = require("./a");
// verify it
if(a == a2) throw new Error("Cache clear failed :("); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/require.resolve/a.js | examples/require.resolve/a.js | module.exports = Math.random(); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/wasm-complex/test.filter.js | examples/wasm-complex/test.filter.js | "use strict";
const supportsWebAssembly = require("../../test/helpers/supportsWebAssembly");
module.exports = () => supportsWebAssembly();
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/wasm-complex/magic-number.js | examples/wasm-complex/magic-number.js | export function getNumber() {
return 42;
}
export function getRandomNumber() {
return Math.floor(Math.random() * 256);
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/wasm-complex/build.js | examples/wasm-complex/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/wasm-complex/memory.js | examples/wasm-complex/memory.js | async function getMemoryFromParentInWorker() {
await new Promise(r => setTimeout(r, 200));
// fake
return new WebAssembly.Memory({ initial: 1 });
}
export const memory = await getMemoryFromParentInWorker();
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/wasm-complex/webpack.config.js | examples/wasm-complex/webpack.config.js | "use strict";
/** @type {import("webpack").Configuration} */
const config = {
// mode: "development" || "production",
output: {
publicPath: "dist/"
},
module: {
rules: [
{
test: /\.wat$/,
use: "wast-loader",
type: "webassembly/async"
}
]
},
optimization: {
chunkIds: "deterministic" // T... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/wasm-complex/magic.js | examples/wasm-complex/magic.js | // reexporting
export * from "./magic.wat";
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/wasm-complex/example.js | examples/wasm-complex/example.js | import { get, set, getNumber } from "./magic.js";
// accessing memory
console.log(get());
set(42);
console.log(get());
set(123);
console.log(get());
// random numbers
console.log(getNumber());
console.log(getNumber());
console.log(getNumber());
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-app-and-vendor/node_modules/example-vendor.js | examples/dll-app-and-vendor/node_modules/example-vendor.js | export function square(n) {
return n * n;
}
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-app-and-vendor/0-vendor/build.js | examples/dll-app-and-vendor/0-vendor/build.js | global.NO_TARGET_ARGS = true;
require("../../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-app-and-vendor/0-vendor/webpack.config.js | examples/dll-app-and-vendor/0-vendor/webpack.config.js | "use strict";
const path = require("path");
const webpack = require("../../../");
/** @type {import("webpack").Configuration} */
const config = {
// mode: "development" || "production",
context: __dirname,
entry: ["example-vendor"],
output: {
filename: "vendor.js", // best use [fullhash] here too
path: path.r... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-app-and-vendor/1-app/build.js | examples/dll-app-and-vendor/1-app/build.js | global.NO_TARGET_ARGS = true;
require("../../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-app-and-vendor/1-app/example-app.js | examples/dll-app-and-vendor/1-app/example-app.js | import { square } from "example-vendor";
console.log(square(7));
console.log(new square(7));
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dll-app-and-vendor/1-app/webpack.config.js | examples/dll-app-and-vendor/1-app/webpack.config.js | "use strict";
const path = require("path");
const webpack = require("../../../");
const manifest = "../0-vendor/dist/vendor-manifest.json";
/** @type {import("webpack").Configuration} */
const config = {
// mode: "development" || "production",
context: __dirname,
entry: "./example-app",
output: {
filename: "ap... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dotenv/build.js | examples/dotenv/build.js | require("../build-common");
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dotenv/webpack.config.js | examples/dotenv/webpack.config.js | "use strict";
const path = require("path");
/** @type {import("webpack").Configuration} */
const config = {
// mode: "development" || "production",
mode: "production",
output: {
path: path.resolve(__dirname, "dist"),
filename: "output.js"
},
// Enable dotenv plugin with default settings
// Loads .env file a... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/dotenv/example.js | examples/dotenv/example.js | // Basic environment variables
console.log("API URL:", process.env.WEBPACK_API_URL);
console.log("API Version:", process.env.WEBPACK_API_VERSION);
console.log("API Timeout:", process.env.WEBPACK_API_TIMEOUT);
console.log("Mode:", process.env.WEBPACK_MODE);
// Application settings
console.log("App Name:", process.env.W... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/named-chunks/build.js | examples/named-chunks/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/named-chunks/webpack.config.js | examples/named-chunks/webpack.config.js | "use strict";
/** @type {import("webpack").Configuration} */
const config = {
optimization: {
chunkIds: "named"
}
};
module.exports = config;
| javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/named-chunks/example.js | examples/named-chunks/example.js | var a = require("a");
require.ensure(["b"], function(require) {
// a named chunk
var c = require("c");
}, "my own chunk");
require.ensure(["b"], function(require) {
// another chunk with the same name
var d = require("d");
}, "my own chunk");
require.ensure([], function(require) {
// the same again
}, "my own c... | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/named-chunks/node_modules/b.js | examples/named-chunks/node_modules/b.js | // module b | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/named-chunks/node_modules/d.js | examples/named-chunks/node_modules/d.js | // module d | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/named-chunks/node_modules/c.js | examples/named-chunks/node_modules/c.js | // module c | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/named-chunks/node_modules/a.js | examples/named-chunks/node_modules/a.js | // module a | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/require.context/build.js | examples/require.context/build.js | require("../build-common"); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/require.context/example.js | examples/require.context/example.js | function getTemplate(templateName) {
return require("./templates/"+templateName);
}
console.log(getTemplate("a"));
console.log(getTemplate("b")); | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
webpack/webpack | https://github.com/webpack/webpack/blob/d2a124db548cad6e84dffd93b502a4e74bfe2b6a/examples/require.context/templates/b.js | examples/require.context/templates/b.js | module.exports = function() {
return "This text was generated by template B";
} | javascript | MIT | d2a124db548cad6e84dffd93b502a4e74bfe2b6a | 2026-01-04T14:56:49.698101Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.