Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-webpack-plugin

Package Overview
Dependencies
Maintainers
2
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-webpack-plugin - npm Package Compare versions

Comparing version 2.8.0 to 2.8.1

29

index.js

@@ -48,4 +48,4 @@ 'use strict';

// If the compilation change didnt change the cache is valid
isCompilationCached = compilationResult.hash && self.hash === compilationResult.hash;
self.hash = compilation.hash;
isCompilationCached = compilationResult.hash && self.childCompilerHash === compilationResult.hash;
self.childCompilerHash = compilationResult.hash;
callback();

@@ -56,8 +56,2 @@ return compilationResult.content;

compiler.plugin('after-compile', function (compilation, callback) {
// Clear the compilation queue
delete compiler.HtmlWebpackPluginQueue;
callback();
});
compiler.plugin('emit', function (compilation, callback) {

@@ -73,3 +67,3 @@ var applyPluginsAsyncWaterfall = Promise.promisify(compilation.applyPluginsAsyncWaterfall, {context: compilation});

// If the template and the assets did not change we don't have to emit the html
var assetJson = JSON.stringify(assets);
var assetJson = JSON.stringify(self.getAssetFiles(assets));
if (isCompilationCached && self.options.cache && assetJson === self.assetJson) {

@@ -490,2 +484,5 @@ return callback();

/**
* Helper to return the absolute template path with a fallback loader
*/
HtmlWebpackPlugin.prototype.getFullTemplatePath = function (template, context) {

@@ -504,2 +501,16 @@ // If the template doesn't use a loader use the lodash template loader

/**
* Helper to return a sorted unique array of all asset files out of the
* asset object
*/
HtmlWebpackPlugin.prototype.getAssetFiles = function (assets) {
var files = _.uniq(Object.keys(assets).filter(function (assetType) {
return assetType !== 'chunks' && assets[assetType];
}).reduce(function (files, assetType) {
return files.concat(assets[assetType]);
}, []));
files.sort();
return files;
};
module.exports = HtmlWebpackPlugin;
{
"name": "html-webpack-plugin",
"version": "2.8.0",
"version": "2.8.1",
"description": "Simplifies creation of HTML files to serve your webpack bundles",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc