html-webpack-plugin
Advanced tools
Comparing version 2.12.0 to 2.13.0
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) !== '/') { |
{ | ||
"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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44863
736
17