New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-bundler-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-bundler-webpack-plugin - npm Package Versions

2345
21

4.19.0

Diff
webdiscus
published 4.19.0 •

Changelog

Source

4.19.0

🔥 BREAKING CHANGES by inlining SVG only

  • Inline <img src="icon.svg">:
    • OLD: replaces <img> with <svg> tag
    • NEW: inline SVG as base64-encoded data URL. Use new svg.inline.embed = true option to keep old behavior.
  • Encoding of data URL:
    • OLD: defaults, escaped URL (#% chars only), e.g. data:image/svg+xml,<svg>...</svg>
    • NEW:
      • defaults, base64 encoded, e.g. data:image/svg+xml;base64,iVBO
      • full escaped URL, e.g. data:image/svg+xml,%3Csvg%20 regards generator.dataUrl.encoding option.

✨ Features

  • Added support the ?inline URL query to force inline an image as dataURL in HTML, JS and CSS. The encoding can be specified using a query value (base64 or escape):

    <img src="./icon.svg?inline"/>        --> src as data URL regards configured encoding, defaults base64
    <img src="./icon.svg?inline=base64"/> --> <img src="data:image/svg+xml;base64,PHN2Zy..."/>
    <img src="./icon.svg?inline=escape"/> --> <img src="data:image/svg+xml,%3Csvg%20...%2F%3E"/>
    
  • Added support the ?embed URL query to replace <img> with <svg> tag kipping img attributes:

    <img class="icon" src="./icon.svg?embed"/>
    

    Result:

    <svg class="icon" ...>...</svg>
    
  • When inlining SVG as a data URL, consider Webpack's generator.dataUrl() and generator.dataUrl.encoding options.

  • Display a warning when used ?embed URL query for SVG files in JS or CSS.

  • New svg plugin option:

    type SvgOptions = {
      enabled?: boolean;
      // RegEx to match SVG files.
      // Defaults `/\.svg/i`.
      test?: RegExp;
      inline?: {
        // Enable inline SVG by replacing <img> with <svg>, only in HTML.
        // Equivalent to query: `?inline=embed` | `?embed`.
        // Defaults `false`.
        embed?: boolean;
        // Data URL encoding, overrides `generator.dataUrl.encoding` option.
        // Equivalent to query: `?inline=base64` | `?inline=escape`.
        // Defaults the `generator.dataUrl.encoding` option, if undefined then `base64`.
        encoding?: 'base64' | false;
      };
    };
    
webdiscus
published 4.19.0-beta.5 •
webdiscus
published 4.18.2 •

Changelog

Source

4.18.2 release (2025-03-14)

  • fix(FaviconsBundlerPlugin): join URL containing sub-paths with a path, #156
webdiscus
published 4.18.1 •

Changelog

Source

4.18.1 release (2025-03-13)

  • fix(FaviconsBundlerPlugin): output.publicPath ignored, #156
webdiscus
published 4.19.0-beta.4 •
webdiscus
published 4.19.0-beta.3 •
webdiscus
published 4.19.0-beta.2 •
webdiscus
published 4.19.0-beta.1 •
webdiscus
published 4.19.0-beta.0 •
webdiscus
published 4.18.0 •

Changelog

Source

4.18.0 release (2025-02-03)

  • chore: bump the version for release
  • docs: add documentation for the router option
2345
21