Socket
Socket
Sign inDemoInstall

html-webpack-plugin

Package Overview
Dependencies
106
Maintainers
4
Versions
138
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.4.0 to 5.5.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [5.5.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.4.0...v5.5.0) (2021-10-25)
### Features
* Support type=module via scriptLoading option ([1e42625](https://github.com/jantimon/html-webpack-plugin/commit/1e4262528ff02a83e1fc7739b42472680fd205c2)), closes [#1663](https://github.com/jantimon/html-webpack-plugin/issues/1663)
### [5.4.0](https://github.com/jantimon/html-webpack-plugin/compare/v5.3.2...v5.3.3) (2021-10-15)

@@ -7,0 +14,0 @@

5

index.js

@@ -73,3 +73,3 @@ // @ts-check

// Assert correct option spelling
assert(options.scriptLoading === 'defer' || options.scriptLoading === 'blocking', 'scriptLoading needs to be set to "defer" or "blocking');
assert(options.scriptLoading === 'defer' || options.scriptLoading === 'blocking' || options.scriptLoading === 'module', 'scriptLoading needs to be set to "defer", "blocking" or "module"');
assert(options.inject === true || options.inject === false || options.inject === 'head' || options.inject === 'body', 'inject needs to be set to true, false, "head" or "body');

@@ -745,3 +745,4 @@

attributes: {
defer: options.scriptLoading !== 'blocking',
defer: options.scriptLoading === 'defer',
type: options.scriptLoading === 'module' ? 'module' : undefined,
src: scriptAsset

@@ -748,0 +749,0 @@ }

8

package.json
{
"name": "html-webpack-plugin",
"version": "5.4.0",
"version": "5.5.0",
"license": "MIT",

@@ -35,5 +35,5 @@ "description": "Simplifies creation of HTML files to serve your webpack bundles",

"cz-conventional-changelog": "2.1.0",
"dir-compare": "1.7.2",
"dir-compare": "^3.3.0",
"html-loader": "2.1.1",
"jest": "26.5.3",
"jest": "^27.2.5",
"mini-css-extract-plugin": "^1.6.0",

@@ -56,3 +56,3 @@ "pug": "3.0.2",

"lodash": "^4.17.21",
"pretty-error": "^3.0.4",
"pretty-error": "^4.0.0",
"tapable": "^2.0.0"

@@ -59,0 +59,0 @@ },

@@ -152,3 +152,3 @@ [![npm][npm]][npm-url]

|**`publicPath`**|`{String\|'auto'}`|`'auto'`|The publicPath used for script and link tags|
|**`scriptLoading`**|`{'blocking'\|'defer'}`|`'defer'`| Modern browsers support non blocking javascript loading (`'defer'`) to improve the page startup performance. |
|**`scriptLoading`**|`{'blocking'\|'defer'\|'module'}`|`'defer'`| Modern browsers support non blocking javascript loading (`'defer'`) to improve the page startup performance. Setting to `'module'` adds attribute [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html). This also implies "defer", since modules are automatically deferred. |
|**`favicon`**|`{String}`|``|Adds the given favicon path to the output HTML|

@@ -155,0 +155,0 @@ |**`meta`**|`{Object}`|`{}`|Allows to inject `meta`-tags. E.g. `meta: {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'}`|

@@ -99,3 +99,3 @@ import { AsyncSeriesWaterfallHook } from "tapable";

*/
scriptLoading?: "blocking" | "defer";
scriptLoading?: "blocking" | "defer" | "module";
/**

@@ -102,0 +102,0 @@ * Inject meta tags

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc