Skip to content

Commit bae5691

Browse files
committed
fix: correct parsing the data passed via query in JSON notation
1 parent 5fc91eb commit bae5691

457 files changed

Lines changed: 6472 additions & 1113 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change log
22

3+
## 3.5.3 (2024-02-28)
4+
5+
- fix: correct parsing the data passed via query in JSON notation, e.g.: `index.ejs?{"title":"Homepage","lang":"en"}`
6+
- fix: by paring of the generated html ignore files already resolved via a preprocessor, e.g. pug
7+
- fix(pug): resolve resource required in pug code and content, also outer tag attributes
8+
- fix(pug): resolve images generated via `responsive-loader` when used query parameters with `,` and `&` separators
9+
- test: add tests from pug-plugin
10+
311
## 3.5.2 (2024-02-20)
412

513
- fix: when used TS then could not find a declaration file for module 'html-bundler-webpack-plugin'

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ You can import a template into JS as a compiled [template function](#template-in
2626

2727
This plugin is an **advanced successor** to `html-webpack-plugin` and a replacement of the [plugins and loaders](#list-of-plugins).
2828

29+
> 📢 Please help promote this plugin on social networks so that developers know about this useful plugin.\
30+
> Special Thanks to [Andrew Lisowski](https://twitter.com/HipsterSmoothie) for the tooltips in the video [www.youtube.com/@devtoolsfm](https://youtu.be/w4l89214zN4?si=x-eVXN-iLlOE_Gqy&t=3463).
31+
2932
<!--
3033
<table align="center">
3134
<tr><th>Entry point is HTML</th></tr>
@@ -127,7 +130,7 @@ You can use a relative path or Webpack alias to a source file.
127130
- Generates the [integrity](#option-integrity) attribute in the `link` and `script` tags.
128131
- Generates the [favicons](#favicons-bundler-plugin) of different sizes for various platforms.
129132
- You can create **own plugin** using the [Plugin Hooks](#plugin-hooks-and-callbacks).
130-
- Over 400 [tests](https://github.com/webdiscus/html-bundler-webpack-plugin/tree/master/test).
133+
- Over 500 [tests](https://github.com/webdiscus/html-bundler-webpack-plugin/tree/master/test).
131134

132135
See the [full list of features](#features).
133136

@@ -540,7 +543,7 @@ See [boilerplate](https://github.com/webdiscus/webpack-html-scss-boilerplate)
540543
- auto processing multiple HTML templates using the [entry path](#option-entry-path)
541544
- [pass data](#option-entry-advanced) into template from the plugin config
542545
- dynamically loading template variables using the [data](#loader-option-data) option, change data w/o restarting
543-
- supports the [integrity](#option-integrity) attribute in the `link` and `script` tags
546+
- generates the `integrity hashes` and adds the [integrity](#option-integrity) attribute to the `link` and `script` tags
544547
- [minification](#option-minify) of generated HTML
545548
- allows extending base functionality using [hooks & callbacks](#plugin-hooks-and-callbacks)
546549
- [generates favicons](#favicons-bundler-plugin) of different sizes for various platforms and injects them into HTML
@@ -2346,7 +2349,7 @@ Type: `'auto'|boolean|IntegrityOptions` Default: `false`
23462349
The [subresource integrity hash](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) is a cryptographic value of the integrity attribute that used by a browser to verify that the content of an asset has not been manipulated.
23472350
If the asset has been manipulated, the browser will never load it.
23482351
2349-
The Bundler Plugin adds the integrity attribute to the `link` and `script` tags when generating HTML.
2352+
The Bundler Plugin generates the integrity hashes and adds the integrity attribute to the `link` and `script` tags when generating HTML.
23502353
23512354
> No additional plugins required. This plugin computes integrity hashes itself.
23522355
@@ -2384,9 +2387,11 @@ or an array to specify multiple hash functions for compatibility with many brows
23842387
>
23852388
> When used the `integrity` option:
23862389
>
2387-
> - the [`js.filename`](#option-js) and [`css.filename`](#option-css) options must contain the `contenthash`;
2388-
> - the [`output.crossOriginLoading`](https://webpack.js.org/configuration/output/#outputcrossoriginloading) Webpack option must be specified;
2389-
> - the [`optimization.realContentHash`](https://webpack.js.org/configuration/optimization/#optimizationrealcontenthash) Webpack option must be enabled, is enabled by default in production mode only.
2390+
> - The [`js.filename`](#option-js) and [`css.filename`](#option-css) options must contain the `contenthash`.
2391+
> - The [`output.crossOriginLoading`](https://webpack.js.org/configuration/output/#outputcrossoriginloading) Webpack option must be specified as `'use-credentials'` or `'anonymous'`.
2392+
> The bundler plugin adds the `crossorigin` attribute with the value defined in the `crossOriginLoading`.
2393+
> The `crossorigin` attribute tells the browser to request the script with CORS enabled, which is necessary because the integrity check fails without CORS.
2394+
> - The [`optimization.realContentHash`](https://webpack.js.org/configuration/optimization/#optimizationrealcontenthash) Webpack option must be enabled, is enabled by default in production mode only.
23902395
>
23912396
> This requirement is necessary to avoid the case where the browser tries to load a contents of a file from the local cache since the filename has not changed, but the `integrity` value has changed on the server.
23922397
> In this case, the browser will not load the file because the `integrity` of the cached file computed by the browser will not match the `integrity` attribute computed on the server.

0 commit comments

Comments
 (0)