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.12.0 to 2.13.0

5

CHANGELOG.md
Change History
==============
v2.13.0
----
* Add support for absolute output file names
* Add support for relative file names outside the output path
v2.12.0

@@ -5,0 +10,0 @@ ----

12

index.js

@@ -38,2 +38,9 @@ 'use strict';

// convert absolute filename into relative so that webpack can
// generate it at correct location
var filename = this.options.filename;
if (path.resolve(filename) === path.normalize(filename)) {
this.options.filename = path.relative(compiler.options.output.path, filename);
}
compiler.plugin('make', function (compilation, callback) {

@@ -343,4 +350,7 @@ // Compile the template (queued)

var publicPath = typeof compilation.options.output.publicPath !== 'undefined'
// If a hard coded public path exists use it
? compilation.mainTemplate.getPublicPath({hash: webpackStatsJson.hash})
: path.relative(path.dirname(self.options.filename), '.').split(path.sep).join('/');
// If no public path was set get a relative url path
: path.relative(path.resolve(compilation.options.output.path, path.dirname(self.options.filename)), compilation.options.output.path)
.split(path.sep).join('/');

@@ -347,0 +357,0 @@ if (publicPath.length && publicPath.substr(-1, 1) !== '/') {

6

package.json
{
"name": "html-webpack-plugin",
"version": "2.12.0",
"version": "2.13.0",
"description": "Simplifies creation of HTML files to serve your webpack bundles",

@@ -14,2 +14,3 @@ "main": "index.js",

"pretest": "semistandard",
"recompile": "node examples/rebuild.js",
"test": "jasmine"

@@ -49,3 +50,4 @@ },

"url-loader": "^0.5.7",
"webpack": "^1.12.14"
"webpack": "^1.12.14",
"webpack-recompilation-simulator": "^1.3.0"
},

@@ -52,0 +54,0 @@ "dependencies": {

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