html-webpack-plugin
Advanced tools
Comparing version 2.23.0 to 2.24.0
Change History | ||
============== | ||
v2.24.0 | ||
--- | ||
* Update dependencies | ||
* Add deprecate warning for plugins not returning a result | ||
* Add [path] for favicons | ||
v2.23.0 | ||
@@ -5,0 +11,0 @@ --- |
46
index.js
@@ -66,3 +66,3 @@ 'use strict'; | ||
compiler.plugin('emit', function (compilation, callback) { | ||
var applyPluginsAsyncWaterfall = Promise.promisify(compilation.applyPluginsAsyncWaterfall, {context: compilation}); | ||
var applyPluginsAsyncWaterfall = self.applyPluginsAsyncWaterfall(compilation); | ||
// Get all chunks | ||
@@ -97,3 +97,3 @@ var chunks = self.filterChunks(compilation.getStats().toJson(), self.options.chunks, self.options.excludeChunks); | ||
.then(function (faviconBasename) { | ||
var publicPath = compilation.options.output.publicPath || ''; | ||
var publicPath = compilation.mainTemplate.getPublicPath({hash: compilation.hash}) || ''; | ||
if (publicPath && publicPath.substr(-1) !== '/') { | ||
@@ -142,8 +142,8 @@ publicPath += '/'; | ||
var pluginArgs = {html: html, assets: assets, plugin: self, outputName: self.childCompilationOutputName}; | ||
return applyPluginsAsyncWaterfall('html-webpack-plugin-before-html-processing', pluginArgs) | ||
.then(function () { | ||
return pluginArgs.html; | ||
}); | ||
return applyPluginsAsyncWaterfall('html-webpack-plugin-before-html-processing', pluginArgs); | ||
}) | ||
.then(function (html) { | ||
.then(function (result) { | ||
var html = result.html; | ||
var assets = result.assets; | ||
var chunks = result.chunks; | ||
// Prepare script and link tags | ||
@@ -154,13 +154,18 @@ var assetTags = self.generateAssetTags(assets); | ||
return applyPluginsAsyncWaterfall('html-webpack-plugin-alter-asset-tags', pluginArgs) | ||
.then(function () { | ||
.then(function (result) { | ||
// Add the stylesheets, scripts and so on to the resulting html | ||
return self.postProcessHtml(html, assets, { body: pluginArgs.body, head: pluginArgs.head }); | ||
return self.postProcessHtml(html, assets, { body: result.body, head: result.head }) | ||
.then(function (html) { | ||
return _.extend(result, {html: html, assets: assets}); | ||
}); | ||
}); | ||
}) | ||
// Allow plugins to change the html after assets are injected | ||
.then(function (html) { | ||
.then(function (result) { | ||
var html = result.html; | ||
var assets = result.assets; | ||
var pluginArgs = {html: html, assets: assets, plugin: self, outputName: self.childCompilationOutputName}; | ||
return applyPluginsAsyncWaterfall('html-webpack-plugin-after-html-processing', pluginArgs) | ||
.then(function () { | ||
return pluginArgs.html; | ||
.then(function (result) { | ||
return result.html; | ||
}); | ||
@@ -619,2 +624,19 @@ }) | ||
/** | ||
* Helper to promisify compilation.applyPluginsAsyncWaterfall that returns | ||
* a function that helps to merge given plugin arguments with processed ones | ||
*/ | ||
HtmlWebpackPlugin.prototype.applyPluginsAsyncWaterfall = function (compilation) { | ||
var promisedApplyPluginsAsyncWaterfall = Promise.promisify(compilation.applyPluginsAsyncWaterfall, {context: compilation}); | ||
return function (eventName, pluginArgs) { | ||
return promisedApplyPluginsAsyncWaterfall(eventName, pluginArgs) | ||
.then(function (result) { | ||
if (!result) { | ||
compilation.warnings.push(new Error('Using html-webpack-plugin-after-html-processing without returning a result is deprecated.')); | ||
} | ||
return _.extend(pluginArgs, result); | ||
}); | ||
}; | ||
}; | ||
module.exports = HtmlWebpackPlugin; |
{ | ||
"name": "html-webpack-plugin", | ||
"version": "2.23.0", | ||
"version": "2.24.0", | ||
"description": "Simplifies creation of HTML files to serve your webpack bundles", | ||
@@ -40,30 +40,30 @@ "main": "index.js", | ||
"appcache-webpack-plugin": "^1.3.0", | ||
"css-loader": "^0.23.1", | ||
"dir-compare": "1.0.1", | ||
"es6-promise": "^3.2.1", | ||
"css-loader": "^0.25.0", | ||
"dir-compare": "1.2.0", | ||
"es6-promise": "^4.0.5", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"file-loader": "^0.9.0", | ||
"html-loader": "^0.4.3", | ||
"html-loader": "^0.4.4", | ||
"jade": "^1.11.0", | ||
"jade-loader": "^0.8.0", | ||
"jasmine": "^2.4.1", | ||
"jasmine": "^2.5.2", | ||
"rimraf": "^2.5.4", | ||
"semistandard": "^8.0.0", | ||
"semistandard": "8.0.0", | ||
"style-loader": "^0.13.1", | ||
"underscore-template-loader": "^0.7.3", | ||
"url-loader": "^0.5.7", | ||
"webpack": "^1.13.1", | ||
"webpack": "^1.13.2", | ||
"webpack-recompilation-simulator": "^1.3.0" | ||
}, | ||
"dependencies": { | ||
"bluebird": "^3.4.1", | ||
"html-minifier": "^3.0.2", | ||
"loader-utils": "^0.2.15", | ||
"lodash": "^4.14.2", | ||
"pretty-error": "^2.0.0", | ||
"bluebird": "^3.4.6", | ||
"html-minifier": "^3.1.0", | ||
"loader-utils": "^0.2.16", | ||
"lodash": "^4.16.4", | ||
"pretty-error": "^2.0.2", | ||
"toposort": "^1.0.0" | ||
}, | ||
"peerDependencies": { | ||
"webpack": "*" | ||
"webpack": "1 || ^2.1.0-beta" | ||
} | ||
} |
@@ -65,3 +65,3 @@ HTML Webpack Plugin | ||
If you have any css assets in webpack's output (for example, css extracted | ||
If you have any CSS assets in webpack's output (for example, CSS extracted | ||
with the [ExtractTextPlugin](https://github.com/webpack/extract-text-webpack-plugin)) | ||
@@ -83,3 +83,3 @@ then these will be included with `<link>` tags in the HTML head. | ||
- `hash`: `true | false` if `true` then append a unique webpack compilation hash to all | ||
included scripts and css files. This is useful for cache busting. | ||
included scripts and CSS files. This is useful for cache busting. | ||
- `cache`: `true | false` if `true` (default) try to emit the file only if it was changed. | ||
@@ -140,4 +140,4 @@ - `showErrors`: `true | false` if `true` (default) errors details will be written into the html page. | ||
If the default generated HTML doesn't meet your needs you can supply | ||
your own template. The easiest way is to use the `inject` option and pass a custom html file. | ||
The html-webpack-plugin will automatically inject all necessary css, js, manifest | ||
your own template. The easiest way is to use the `template` option and pass a custom html file. | ||
The html-webpack-plugin will automatically inject all necessary CSS, JS, manifest | ||
and favicon files into the markup. | ||
@@ -144,0 +144,0 @@ |
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
53101
851
+ Addedacorn@4.0.135.7.4(transitive)
+ Addedacorn-dynamic-import@2.0.2(transitive)
+ Addedajv@4.11.8(transitive)
+ Addedajv-keywords@1.5.1(transitive)
+ Addedalign-text@0.1.4(transitive)
+ Addedanymatch@2.0.03.1.3(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedasn1.js@4.10.1(transitive)
+ Addedassert@1.5.1(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedasync@2.6.4(transitive)
+ Addedasync-each@1.0.6(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbinary-extensions@1.13.12.3.0(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbn.js@4.12.05.2.1(transitive)
+ Addedbraces@2.3.23.0.3(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedbrowserify-aes@1.2.0(transitive)
+ Addedbrowserify-cipher@1.0.1(transitive)
+ Addedbrowserify-des@1.0.2(transitive)
+ Addedbrowserify-rsa@4.1.1(transitive)
+ Addedbrowserify-sign@4.2.3(transitive)
+ Addedbrowserify-zlib@0.2.0(transitive)
+ Addedbuffer@4.9.2(transitive)
+ Addedbuffer-xor@1.0.3(transitive)
+ Addedbuiltin-status-codes@3.0.0(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcamelcase@1.2.1(transitive)
+ Addedcenter-align@0.1.3(transitive)
+ Addedchokidar@2.1.83.6.0(transitive)
+ Addedcipher-base@1.0.4(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedcliui@2.1.0(transitive)
+ Addedco@4.6.0(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedconsole-browserify@1.2.0(transitive)
+ Addedconstants-browserify@1.0.0(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcreate-ecdh@4.0.4(transitive)
+ Addedcreate-hash@1.2.0(transitive)
+ Addedcreate-hmac@1.1.7(transitive)
+ Addedcrypto-browserify@3.12.1(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addeddes.js@1.1.0(transitive)
+ Addeddiffie-hellman@5.0.3(transitive)
+ Addeddomain-browser@1.2.0(transitive)
+ Addedelliptic@6.6.0(transitive)
+ Addedenhanced-resolve@3.4.1(transitive)
+ Addederrno@0.1.8(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedevp_bytestokey@1.0.3(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedfill-range@4.0.07.1.1(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfsevents@1.2.132.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedglob-parent@3.1.05.1.2(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-flag@1.0.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhash-base@3.0.4(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedhttps-browserify@1.0.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinherits@2.0.32.0.4(transitive)
+ Addedinterpret@1.4.0(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-binary-path@1.0.12.1.0(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@3.1.04.0.3(transitive)
+ Addedis-number@3.0.07.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisarray@1.0.02.0.5(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedjson-loader@0.5.7(transitive)
+ Addedjson-stable-stringify@1.1.1(transitive)
+ Addedjsonify@0.0.1(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedlazy-cache@1.0.4(transitive)
+ Addedloader-runner@2.4.0(transitive)
+ Addedlongest@1.0.1(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmd5.js@1.3.5(transitive)
+ Addedmemory-fs@0.4.1(transitive)
+ Addedmicromatch@3.1.10(transitive)
+ Addedmiller-rabin@4.0.1(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedms@2.0.0(transitive)
+ Addednan@2.22.0(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addednode-libs-browser@2.2.1(transitive)
+ Addednormalize-path@2.1.13.0.0(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedos-browserify@0.3.0(transitive)
+ Addedpako@1.0.11(transitive)
+ Addedparse-asn1@5.1.7(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedpath-browserify@0.0.1(transitive)
+ Addedpath-dirname@1.0.2(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpbkdf2@3.1.2(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedprr@1.0.1(transitive)
+ Addedpublic-encrypt@4.0.3(transitive)
+ Addedpunycode@1.4.1(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedquerystring-es3@0.2.1(transitive)
+ Addedrandomfill@1.0.4(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedreaddirp@2.2.13.6.0(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedright-align@0.1.3(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedsha.js@2.4.11(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-list-map@2.0.1(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedstream-browserify@2.0.2(transitive)
+ Addedstream-http@2.8.3(transitive)
+ Addedstring_decoder@1.1.11.3.0(transitive)
+ Addedsupports-color@3.2.3(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtapable@0.2.9(transitive)
+ Addedtimers-browserify@2.0.12(transitive)
+ Addedto-arraybuffer@1.0.1(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.15.0.1(transitive)
+ Addedtty-browserify@0.0.0(transitive)
+ Addeduglify-js@2.8.29(transitive)
+ Addeduglify-to-browserify@1.0.2(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedupath@1.2.0(transitive)
+ Addedurix@0.1.0(transitive)
+ Addedurl@0.11.4(transitive)
+ Addeduse@3.1.1(transitive)
+ Addedutil@0.10.40.11.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedvm-browserify@1.1.2(transitive)
+ Addedwatchpack@1.7.5(transitive)
+ Addedwatchpack-chokidar2@2.0.1(transitive)
+ Addedwebpack@2.7.0(transitive)
+ Addedwebpack-sources@1.4.3(transitive)
+ Addedwindow-size@0.1.0(transitive)
+ Addedwordwrap@0.0.2(transitive)
+ Addedxtend@4.0.2(transitive)
+ Addedyargs@3.10.0(transitive)
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/source-map@0.3.6(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removed@types/json-schema@7.0.15(transitive)
- Removed@types/node@22.8.5(transitive)
- Removed@webassemblyjs/ast@1.12.1(transitive)
- Removed@webassemblyjs/floating-point-hex-parser@1.11.6(transitive)
- Removed@webassemblyjs/helper-api-error@1.11.6(transitive)
- Removed@webassemblyjs/helper-buffer@1.12.1(transitive)
- Removed@webassemblyjs/helper-numbers@1.11.6(transitive)
- Removed@webassemblyjs/helper-wasm-bytecode@1.11.6(transitive)
- Removed@webassemblyjs/helper-wasm-section@1.12.1(transitive)
- Removed@webassemblyjs/ieee754@1.11.6(transitive)
- Removed@webassemblyjs/leb128@1.11.6(transitive)
- Removed@webassemblyjs/utf8@1.11.6(transitive)
- Removed@webassemblyjs/wasm-edit@1.12.1(transitive)
- Removed@webassemblyjs/wasm-gen@1.12.1(transitive)
- Removed@webassemblyjs/wasm-opt@1.12.1(transitive)
- Removed@webassemblyjs/wasm-parser@1.12.1(transitive)
- Removed@webassemblyjs/wast-printer@1.12.1(transitive)
- Removed@xtuc/ieee754@1.2.0(transitive)
- Removed@xtuc/long@4.2.2(transitive)
- Removedacorn@8.14.0(transitive)
- Removedacorn-import-attributes@1.9.5(transitive)
- Removedajv@6.12.6(transitive)
- Removedajv-keywords@3.5.2(transitive)
- Removedbrowserslist@4.24.2(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcaniuse-lite@1.0.30001676(transitive)
- Removedchrome-trace-event@1.0.4(transitive)
- Removedcommander@2.20.3(transitive)
- Removedelectron-to-chromium@1.5.49(transitive)
- Removedenhanced-resolve@5.17.1(transitive)
- Removedes-module-lexer@1.5.4(transitive)
- Removedescalade@3.2.0(transitive)
- Removedeslint-scope@5.1.1(transitive)
- Removedesrecurse@4.3.0(transitive)
- Removedestraverse@4.3.05.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedglob-to-regexp@0.4.1(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedjest-worker@27.5.1(transitive)
- Removedjson-parse-even-better-errors@2.3.1(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedloader-runner@4.3.0(transitive)
- Removedmerge-stream@2.0.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-releases@2.0.18(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedschema-utils@3.3.0(transitive)
- Removedserialize-javascript@6.0.2(transitive)
- Removedsource-map-support@0.5.21(transitive)
- Removedsupports-color@8.1.1(transitive)
- Removedtapable@2.2.1(transitive)
- Removedterser@5.36.0(transitive)
- Removedterser-webpack-plugin@5.3.10(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedupdate-browserslist-db@1.1.1(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedwatchpack@2.4.2(transitive)
- Removedwebpack@5.95.0(transitive)
- Removedwebpack-sources@3.2.3(transitive)
Updatedbluebird@^3.4.6
Updatedhtml-minifier@^3.1.0
Updatedloader-utils@^0.2.16
Updatedlodash@^4.16.4
Updatedpretty-error@^2.0.2