text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|> } } for (const m of modulesInOccurrenceOrder) { const result = countOccurs(m) + chunkGraph.getNumberOfModuleChunks(m) + /** @type {number} */ (entryCountMap.get(m)); occursInAllChunksMap.set(m, result); } const naturalCompare = compareModulesByPreOrderInde...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { WebpackError } = require(".."); const { getUsedModuleIdsAndModules } = require("./IdHelpers"); /** @typedef {import("../Compiler")} Compiler */ /** @typedef {import("../Module")} Mo...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const util = require("util"); const memoize = require("./util/memoize"); /** @typedef {import("../declarations/WebpackOptions").Entry} Entry */ /** @typedef {import("../declarations/Webpack...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { ConcatSource, PrefixSource, RawSource } = require("webpack-sources"); const { RuntimeGlobals } = require(".."); const HotUpdateChunk = require("../HotUpdateChunk"); const Template = require("../Te...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; /** @typedef {import("estree").Node} Node */ /** @typedef {import("./JavascriptParser").Range} Range */ /** @typedef {import("./JavascriptParser").VariableInfo} VariableInfo */ /** @typedef ...
fim
webpack/webpack
javascript
<|fim_suffix|>ndefined][], runtimeChunk: Chunk | null }} Object containing chunk entries and runtime chunk */ function getChunkInfo(chunk, chunkGraph) { const entries = [ ...chunkGraph.getChunkEntryModulesWithChunkGroupIterable(chunk) ]; const runtimeChunk = entries.length > 0 ? /** @type {Entrypoint[][]} */...
fim
webpack/webpack
javascript
<|fim_suffix|>d(chunk); } } return chunks; }; module.exports.getAllChunks = getAllChunks; <|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const Entrypoint = require("../Entrypoint"); /** @typedef {import("../Chunk")} Chunk */<|fim_m...
fim
webpack/webpack
javascript
<|fim_suffix|> } ) .replace(/^\/+/g, "") .split("/"); // remove common parts while ( currentOutputName.length > 1 && runtimeOutputName.length > 1 && currentOutputName[0] === runtimeOutputName[0] ) { currentOutputName.shift(); runtimeOutputName.shift(...
fim
webpack/webpack
javascript
<|fim_suffix|>rror https://github.com/microsoft/TypeScript/issues/41697 const CommonJsChunkLoadingPlugin = require("../node/CommonJsChunkLoadingPlugin"); new CommonJsChunkLoadingPlugin({ asyncChunkLoading: true }).apply(compiler); break; } case "import": { const ModuleChunkLoadin...
fim
webpack/webpack
javascript
<|fim_suffix|>or} error the error * @param {NormalModule} module module for which the code should be generated * @param {GenerateContext} generateContext context for generate * @returns {Source | null} generated code */ generateError(error, module, generateContext) { return new RawSource(`throw new Error(${J...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const NormalModule = require("../NormalModule"); const makeSerializable = require("../util/makeSerializable"); /** @typedef {import("../Module").BuildMeta} BuildMeta */ /** @typedef {import("../NormalModule").NormalModu...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const vm = require("vm"); const eslintScope = require("eslint-scope"); const { SyncBailHook, SyncHook, SyncWaterfallHook } = require("tapable"); const { CachedSource, ConcatSource, OriginalSource, Pre...
fim
webpack/webpack
javascript
<|fim_suffix|>/UnsupportedFeatureWarning"); const BasicEvaluatedExpression = require("./BasicEvaluatedExpression"); /** @typedef {import("estree").Expression} Expression */ /** @typedef {import("estree").SourceLocation} SourceLocation */ /** @typedef {import("./JavascriptParser")} JavascriptParser */ /** @typedef {imp...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); const { isSubset } = require("../util/SetHelpers"); const { getAllChunks } = require("./ChunkHel...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { register } = require("../util/serialization"); /** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializer<|fim_suffix|>")} Hash */ /** @typedef {import("../util/fs...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { RawSource } = require("webpack-sources"); const ConcatenationScope = require("../ConcatenationScope"); const { UsageState } = require("../ExportsInfo"); const Generator = require(".....
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const NormalModule = require("../NormalModule"); const makeSerializable = require("../util/makeSerializable"); /** @typedef {import("../NormalModule").NormalModuleBuildInfo} NormalModuleBuildInfo */ /** @typedef {import("../NormalMod...
fim
webpack/webpack
javascript
<|fim_suffix|> options ) ); return new JsonParser(parserOptions); }); normalModuleFactory.hooks.createGenerator .for(JSON_MODULE_TYPE) .tap(PLUGIN_NAME, (generatorOptions) => { compiler.validate( () => require("../../schemas/plugins/json/JsonModulesPluginGene...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const Parser = require("../Parser"); const JsonExportsDependency = require("../dependencies/JsonExportsDependency"); const parseJson = require("../util/parseJson"); const JsonData = require(...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const JavascriptModulesPlugin = require("../javascript/JavascriptModulesPlugin"); /** @typedef {import("webpack-sources").Source} Source...
fim
webpack/webpack
javascript
<|fim_suffix|>ype {string} */ (name); const _amdContainer = /** @type {string} */ (amdContainer); return { name: _name, amdContainer: _amdContainer }; } /** * Returns source with library export. * @param {Source} source source * @param {RenderContext} renderContext render context * @param {LibraryContext...
fim
webpack/webpack
javascript
<|fim_suffix|> */ _getResolvedFullName(options, chunk, compilation) { const prefix = this._getPrefix(compilation); const fullName = options.name ? [ ...prefix, ...(Array.isArray(options.name) ? options.name : [options.name]) ] : /** @type {string[]} */ (prefix); return fullName.map((n) => ...
fim
webpack/webpack
javascript
<|fim_suffix|> types. * @param {Compiler} compiler the compiler instance * @returns {LibraryTypes} enabled types */ const getEnabledTypes = (compiler) => { let set = enabledTypes.get(compiler); if (set === undefined) { /** @type {LibraryTypes} */ set = new Set(); enabledTypes.set(compiler, set); } return s...
fim
webpack/webpack
javascript
<|fim_suffix|>Info.canInlineUse = false; } else { const exportsInfo = moduleGraph.getExportsInfo(module); exportsInfo.setUsedInUnknownWay(runtime); } moduleGraph.addExtraReason(module, "used as library export"); } /** * Processes the provided chunk. * @param {Chunk} chunk the chunk * @param {Runtim...
fim
webpack/webpack
javascript
<|fim_suffix|>rent 'library.type' to ensure compatibility.\nLearn more: https://webpack.js.org/configuration/output/"; } } module.exports = FalseIIFEUmdWarning; <|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Arka Pratim Chaudhuri @arkapratimc */ "use strict"; const WebpackE...
fim
webpack/webpack
javascript
<|fim_suffix|> source * @param {RenderContext} renderContext render context * @param {LibraryContext<T>} libraryContext context * @returns {Source} source with library export */ render(source, { chunk }, { options, compilation }) { const name = compilation.getPath(options.name, { chunk }); return new ...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { ConcatSource } = require("webpack-sources"); const { UsageState } = require("../ExportsInfo"); const ExternalModule = require("../ExternalModule"); const RuntimeGlobals = require(".....
fim
webpack/webpack
javascript
<|fim_suffix|>e need to keep compatibility with SystemJS format libraries (they are using `default`) and bundled SystemJS libraries from commonjs format instructions.push( `${external}${propertyAccess([ used ])} = module["default"] || module;` ); ...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { ConcatSource, OriginalSource } = require("webpack-sources"); const ExternalModule = require("../ExternalModule"); const Template = require("../Template"); const AbstractLibraryPlugin...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const LogType = Object.freeze({ error: /** @type {"error"} */ ("error"), // message, c style arguments warn: /** @type {"warn"} */ ("warn"), // message, c style arguments info: /** @type {"info"} */ ("...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { LogType } = require("./Logger"); /** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */ /** @typedef {import("../../declarations/WebpackOptions").FilterType...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { SyncBailHook } = require("tapable"); const { Logger } = require("./Logger"); const createConsoleLogger = require("./createConsoleLogger"); /** @type {createConsoleLogger.LoggerOptio...
fim
webpack/webpack
javascript
<|fim_suffix|>gth > 0 ? Math.max(...shorterItems) : 0; const maxReduce = maxLength - nextToMaxLength; let maxItems = lengths.length - shorterItems.length; let overrun = currentLength - availableLength; for (let i = 0; i < lengths.length; i++) { if (lengths[i] === maxLength) { const reduce = Math.min(Math...
fim
webpack/webpack
javascript
<|fim_suffix|>if (!isEnabledForChunk(chunk)) return; set.add(RuntimeGlobals.getChunkScriptFilename); }); compilation.hooks.runtimeRequirementInTree .for(RuntimeGlobals.hmrDownloadUpdateHandlers) .tap(PLUGIN_NAME, (chunk, set) => { if (!isEnabledForChunk(chunk)) return; set.add(RuntimeGloba...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { CachedInputFileSystem } = require("enhanced-resolve"); const fs = require("graceful-fs"); const createConsoleLogger = require("../logging/createConsoleLogger"); const NodeWatchFileSy...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; /** @typedef {import("../Compiler")} Compiler */ class NodeSourceP<|fim_suffix|>ns {void} */ apply(compiler) {} } module.exports = NodeSourcePlugin; <|fim_middle|>lugin { /** * Appli...
fim
webpack/webpack
javascript
<|fim_suffix|>e; }, builtins).apply(compiler); } } module.exports = NodeTargetPlugin; <|fim_prefix|>/* MIT License http://www.ope<|fim_middle|>nsource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const ExternalsPlugin = require("../ExternalsPlugin"); /** @typedef {import("../../de...
fim
webpack/webpack
javascript
<|fim_suffix|>ire"; compiler.options.output.chunkLoading = chunkLoading; new CommonJsChunkFormatPlugin().apply(compiler); new EnableChunkLoadingPlugin(chunkLoading).apply(compiler); } } module.exports = NodeTemplatePlugin; <|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author ...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const util = require("util"); const Watchpack = require("watchpack"); /** @typedef {import("watchpack").TimeInfoEntries} TimeInfoEntries */ /** @typedef {import("watchpack").WatchOptions} W...
fim
webpack/webpack
javascript
<|fim_suffix|>e.indent([ "// load the chunk and return promise to it", "var promise = new Promise(function(resolve, reject) {", Template.indent([ "installedChunkData = installedChunks[chunkId] = [resolve, reject];", `var filename = require(${runtimeTemplate....
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { WEBASSEMBLY_MODULE_TYPE_ASYNC } = require("../ModuleTypeConstants"); const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); const AsyncWasmComp...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { WEBASSEMBLY_MODULE_TYPE_SYNC } = require("../ModuleTypeConstants"); const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); const WasmChunkLoadi...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); const { generateJavascriptHMR } = require("../hmr/JavascriptHotModuleRepla...
fim
webpack/webpack
javascript
<|fim_suffix|>s) => { if (currentCollapsed > 0) return; clearStatusMessage(); const str = indent(util.format(...args), prefix, colorFn); stream.write(`${str}\n`); writeStatusMessage(); }; /** @type {<T extends unknown[]>(...args: T) => void} */ const writeGroupMessage = writeColored("<-> ", (str) =>...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { STAGE_ADVANCED } = require("../OptimizationStages"); /** @typedef {import("../Chunk")} Chunk */ /** @typedef {import("../Compiler")} Compiler */ /** * Defines the aggressive mergi...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { STAGE_ADVANCED } = require("../OptimizationStages"); const { intersect } = require("../util/SetHelpers"); const { compareChunks, compareModulesByIdentifier } = require("../util/com...
fim
webpack/webpack
javascript
<|fim_suffix|> modules, compilation.moduleGraph ); for (const m of modules) { /** @type {import("../Module").BuildInfo} */ (m.buildInfo).isCircular = circularModules.has(m); } } ); }); } } module.exports = CircularModulesPlugin; <|fim_prefix|>/* MIT License http://www.opens...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const eslintScope = require("eslint-scope"); const Referencer = require("eslint-scope/lib/referencer"); const { SyncBailHook } = require("tapable"); const { CachedSource, ConcatSource, Re...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Haijie Xie @hai-x */ "use strict"; const BasicEvaluatedExpression = require("../javascript/BasicEvaluatedExpression"); const { VariableInfoFlags } = require("../javascript/JavascriptParser"); const { CONST_BINDING_TAG, toInlinedV...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Natsu @xiaoxiaojx */ "use strict"; /** @typedef {import("../Module")} Module */ /** @typedef {import("../ModuleGraph")} ModuleG<|fim_suffix|>duleGraph) { /** @type {Module[]} */ const moduleList = []; /** @type {Map<Module,...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { STAGE_BASIC } = require("../OptimizationStages"); /** @typedef {import("../Chunk")} Chunk */ /** @typedef {import("../ChunkGroup")} ChunkGroup */ /** @typedef {import("../Compiler")...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { compareIds } = require("../util/comparators"); /** @typedef {import("../Chunk")} Chunk */ /** @typedef {import("../Chunk").ChunkId} ChunkId */ /** @typedef {import("../Compiler")} C...
fim
webpack/webpack
javascript
<|fim_suffix|> value or undefined */ const toInlinedValue = (evaluated) => { if (!evaluated) return; if (evaluated.isNull()) return new InlinedValue("null", null); if (evaluated.isUndefined()) return new InlinedValue("undefined", undefined); if (evaluated.isBoolean()) { return new InlinedValue("boolean", /** @ty...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Haijie Xie @hai-x */ "use strict"; const { UsageState } = require("../ExportsInfo"); const { JAVASCRIPT_MODULE_TYPE_AUTO, JAVASCRIPT_MODULE_TYPE_ESM } = require("../ModuleTypeConstants"); const ConstValueParserPlugin = require(...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Sergey Melyukov @smelukov */ "use strict"; const { UsageState } = require("../ExportsInfo"); const JavascriptParser = require("../javascript/JavascriptParser"); /** @typedef {import("../Compilation")} Compilation */ /** @typedef {import("../D...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { JAVASCRIPT_MODULE_TYPE_AUTO, JAVASCRIPT_MODULE_TYPE_ESM } = require("../ModuleTypeConstants"); const RuntimeGlobals = require("../Ru<|fim_suffix|> parser.scope.topLevelScope...
fim
webpack/webpack
javascript
<|fim_suffix|>; const finishUpdate = combinations.startUpdate(combination); combination.a = a; combination.integratedSize = newIntegratedSize; combination.aSize = integratedSize; combination.sizeDiff = combination.bSize + integratedSize - newIntegratedSize; ...
fim
webpack/webpack
javascript
<|fim_suffix|>inistic names */ constructor(deterministic) { /** @type {boolean} */ this._deterministic = deterministic; } /** * Applies the plugin by registering its hooks on the compiler. * @param {Compiler} compiler the compiler instance * @returns {void} */ apply(compiler) { const { _determinist...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { STAGE_BASIC } = require("../OptimizationStages"); const { runtimeEqual } = require("../util/runtime"); /** @typedef {import("../../declarations/plugins/optimize/MergeDuplicateChunks...
fim
webpack/webpack
javascript
<|fim_suffix|>d integrated size const a = /** @type {number} */ (chunkSizesMap.get(pair[0])); const b = /** @type {number} */ (chunkSizesMap.get(pair[1])); const ab = chunkGraph.getIntegratedChunksSize( pair[0], pair[1], this.options ); /** @type {[number, numb...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const WebpackError = require("../errors/WebpackError"); const formatSize = require("../util/formatSize"); class MinMaxSizeWarning extends WebpackError { /** * Creates an instance of MinM...
fim
webpack/webpack
javascript
<|fim_suffix|>ogger.timeEnd("sort concat configurations"); /** @type {Set<Module>} */ const usedModules = new Set(); logger.time("create concatenated modules"); asyncLib.each( concatConfigurations, (concatConfiguration, callback) => { const rootModule = concatConfiguration.rootMo...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { SyncBailHook } = require("tapable"); const { CachedSource, CompatSource, RawSource } = require("webpack-sources"); const Compilation = require("../Compilation"); const WebpackError =...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { STAGE_ADVANCED, STAGE_BASIC } = require("../OptimizationStages"); /** @typedef {import("../Chunk")} Chunk */ /** @typedef {import("../Compiler")} Compiler */ const PLUGIN_NAME = "R...
fim
webpack/webpack
javascript
<|fim_suffix|>t own info yet: create new entry availableModulesMask = parentMask; changed = true; } else { const newMask = availableModulesMask & parentMask; if (newMask !== availableModulesMask) { changed = true; availableModulesMask = newMask; } ...
fim
webpack/webpack
javascript
<|fim_suffix|> { compilation.hooks.addEntry.tap(PLUGIN_NAME, (_, { name: entryName }) => { if (entryName === undefined) return; const data = /** @type {EntryData} */ (compilation.entries.get(entryName)); if (data.options.runtime === undefined && !data.options.dependOn) { // Determine runti...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const glob2regexp = require("glob-to-regexp"); const { JAVASCRIPT_MODULE_TYPE_AUTO, JAVASCRIPT_MODULE_TYPE_DYNAMIC, JAVASCRIPT_MODULE_TYPE_ESM } = require("../ModuleTypeConstants"); const { STAGE_DEFAU...
fim
webpack/webpack
javascript
<|fim_suffix|>getExportsCombinationsFactory()(key); /** * Defines the selected chunks result type used by this module. * @typedef {object} SelectedChunksResult * @property {Chunk[]} chunks the list of chunks * @property {bigint | Chunk} key a key of the list */ /** @typedef {We...
fim
webpack/webpack
javascript
<|fim_suffix|>s.name = "AssetsOverSizeLimitWarning"; /** @type {AssetDetails[]} */ this.assets = assetsOverSizeLimit; } } /** @type {typeof AssetsOverSizeLimitWarning} */ module.exports = AssetsOverSizeLimitWarning; <|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Sean Lark...
fim
webpack/webpack
javascript
<|fim_suffix|> ${asset}`).join("\n")}` ) .join(""); super(`entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (${formatSize( entrypointLimit )}). This can impact web performance. Entrypoints:${entrypointList}\n`); /** @type {string} */ this.name = "Ent...
fim
webpack/webpack
javascript
<|fim_suffix|>g import() or require.ensure to lazy load some parts of your application.\n" + "For more info visit https://webpack.js.org/guides/code-splitting/" ); /** @type {string} */ this.name = "NoAsyncChunksWarning"; } } module.exports = NoAsyncChunksWarning; <|fim_prefix|>/* MIT License http://www.o...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Sean Larkin @thelarkinn */ "use strict"; con<|fim_suffix|>ize of the entrypoint */ const getEntrypointSize = (entrypoint) => { let size = 0; for (const file of entrypoint.getFiles()) { const asset = compilatio...
fim
webpack/webpack
javascript
<|fim_suffix|>ng | null} runtime code */ generate() { const { runtimeFunction, runtimeHandlers } = this; const compilation = /** @type {Compilation} */ (this.compilation); const { runtimeTemplate } = compilation; return Template.asString([ `${runtimeHandlers} = {};`, `${runtimeFunction} = ${runtimeTemp...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const ChunkPrefetchFunctionRuntimeModule = require("./ChunkPrefetchFunctionRuntimeModule"); const ChunkPrefetchStartupRuntimeModule = req...
fim
webpack/webpack
javascript
<|fim_suffix|>{JSON.stringify( // This need to include itself to delay execution after this chunk has been fully loaded onChunks.filter((c) => c === chunk).map((c) => c.id) )}, ${runtimeTemplate.basicFunction( "", chunks.size < 3 ? Array.from( chunks, (c) => ...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); /** @typedef {import("../Compilation")} Compilation */ /** @typedef {import("../Chunk")....
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); /** @typedef {import("../Compilation")} Compilation */ /** @typedef {impor...
fim
webpack/webpack
javascript
<|fim_suffix|> /** @type {string | BasicEffectRuleKeys} */ this.effectType = effectType || ruleProperty; } /** * Applies the plugin by registering its hooks on the compiler. * @param {RuleSetCompiler} ruleSetCompiler the rule set compiler * @returns {void} */ apply(ruleSetCompiler) { ruleSetCompiler.hoo...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; /** @typedef {import("../../declarations/WebpackOptions").RuleSetConditionOrConditions} RuleSetConditionOrConditions */ /** @typedef {import("../../declarations/WebpackOptions").RuleSetCondi...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; /** @typedef {import("../../declarations/WebpackOptions").RuleSetConditionOrConditions} RuleSetConditionOrConditions */ /** @typedef {import("../../declarations/WebpackOptions").RuleSetRule}...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const { SyncHook } = require("tapable"); /** @typedef {import("enhanced-resolve").ResolveRequest} ResolveRequest */ /** @typedef {import("../../declarations/WebpackOptions").Falsy} Falsy */...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const util = require("util"); /** @typedef {import("../../declarations/WebpackOptions").Falsy} Falsy */ /** @typedef {import("../../declarations/WebpackOptions").RuleSetLoader} RuleSetLoade...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); const HelperRuntimeModule = require("./HelperRuntimeModule"); /** @typedef {import("../Compilation")} Compilation */ class A...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); const JavascriptModulesPlugin = require("../javascript/JavascriptModulesPlu...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Ivan Kopeykin @vankop */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); /** @typedef {import("../../declarations/WebpackOptions").EntryDescription<|fim_suffi...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://w<|fim_suffix|>eModule extends RuntimeModule { /** * @param {string} chunkName the chunk's name */ constructor(chunkName) { super("chunkName"); /** @type {string} */ this.chunkName = chunkName; } /** * Generates runtime code for this runtime module. * @returns {st...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); const HelperRuntimeModule = require("./HelperRuntimeModule"); /** @typedef {import("../Compilation")} Compilation */ class C...
fim
webpack/webpack
javascript
<|fim_suffix|>ntimeRequirements.has(RuntimeGlobals.ensureChunk)) { const requireEnsureHandler = mainTemplate.hooks.requireEnsure.call( "", chunk, compilation.hash || "XXXX", "chunkId" ); if (requireEnsureHandler) { requireEnsure = `${ RuntimeGlobals.ensureChunkHandlers }.compat = $...
fim
webpack/webpack
javascript
<|fim_suffix|>rototypes || [null, getProto({}), getProto([]), getProto(getProto)];", "for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {", Template.indent([ `Object.getOwnPropertyNames(curren...
fim
webpack/webpack
javascript
<|fim_suffix|> ); } } module.exports = CreateScriptRuntimeModule; <|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); const HelperRuntimeModule = require("./HelperRuntimeModul...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const Template = require("../Template"); const HelperRuntimeModule = require("./HelperRuntimeModule"); /** @typedef {import("../Compilation")} Compilation */ class CreateScriptUrl...
fim
webpack/webpack
javascript
<|fim_suffix|>rable: true, get: definition[key] });" ]), "}" ]), "}" ]), "}" ])};` ]); } } module.exports = DefinePropertyGettersRuntimeModule; <|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../Runt...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); /** @typedef {import("../Compilation")} Compilation */ /** @typedef {import("../Module")...
fim
webpack/webpack
javascript
<|fim_suffix|>apping of results of fn */ const createMap = (fn) => { /** @type {Record<ChunkId, ChunkId>} */ const obj = {}; let useId = false; /** @type {ChunkId | undefined} */ let lastKey; let entries = 0; for (const c of dynamicUrlChunks) { const value = fn(c); if (value === c.id) ...
fim
webpack/webpack
javascript
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); /** @typedef {import("../Compilation")} Compilation */ class GetFullHashRuntimeModule extends RuntimeModule { constructor() { ...
fim
webpack/webpack
javascript
<|fim_suffix|>meRuntimeModule extends RuntimeModule { /** * @param {string} name readable name * @param {string} global global object binding * @param {string} filename main file name */ constructor(name, global, filename) { super(`get ${name} filename`); /** @type {string} */ this.global = global; /*...
fim
webpack/webpack
javascript
<|fim_suffix|>"../RuntimeGlobals"); const Template = require("../Template"); const HelperRuntimeModule = require("./HelperRuntimeModule"); /** @typedef {import("../Compilation")} Compilation */ /** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */ class GetTrustedTypesPolicyRun...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); class GlobalRuntimeModule extends RuntimeModule { constructor() { super...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensource.org/licenses/mit-license.php Author Sergey Melyukov @smelukov */ "use strict"; const RuntimeGlobals = require("../RuntimeGlobals"); const RuntimeModule = require("../RuntimeModule"); const Template = require("../Template"); /** @typedef {import("../Compilation")} ...
fim
webpack/webpack
javascript
<|fim_prefix|>/* MIT License http://www.opensou<|fim_suffix|>s RuntimeModule { /** * Creates a helper runtime module with the provided readable name. * @param {string} name a readable name */ constructor(name) { super(name); } } module.exports = HelperRuntimeModule; <|fim_middle|>rce.org/licenses/mit-licen...
fim
webpack/webpack
javascript