Skip to content

Instantly share code, notes, and snippets.

View HtmlPlugin.js
"use strict";
const Mustache = require("mustache");
const path = require("path");
/**
* This plugin is used to generate an html file from a mustache template.
* @param {object} options
* - enabled {boolean} whether plugin is enabled
* - outputFile {string} the relative path to the html file result
View ChunkParallelSplitter.js
"use strict";
const PluginHelper = require("../lib/PluginHelper");
var _pluginInstance;
/**
* This plugin will look at each non-entry/non-named/non-localization chunk and slice it up into additional chunks
* so that the size of each of those chunks don't exceed the specified maxSize.
* At runtime, the sliced chunks are loaded together as one in parallel.
* @param {object} options
View ChunkParallelSplitter.js
"use strict";
const PluginHelper = require("../lib/PluginHelper");
var _pluginInstance;
/**
* This plugin will look at each non-entry/non-named/non-localization chunk and slice it up into additional chunks
* so that the size of each of those chunks don't exceed the specified maxSize.
* At runtime, the sliced chunks are loaded together as one in parallel.
* @param {object} options
@MagicDuck
MagicDuck / Compilation.js
Last active Jul 12, 2017
webpack Compilation.js patch
View Compilation.js
"use strict";
/**
* processDependenciesBlockForChunk() would go into insane recursion in the old code, this patch fixes that up
* by using a stack to process the work instead; it also checks module membership into chunk.modules using a Set
* to speed things up.
*
* Original code license:
* MIT License http://www.opensource.org/licenses/mit-license.php
* Author Tobias Koppers @sokra
*/