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
0
Versions
192
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

1
20

4.4.0

Diff

Changelog

Source

4.4.0 (2024-11-04)

  • feat: add context loader option to resolve assets w/o leading / in a directory outer your project:
    new HtmlBundlerPlugin({
      loaderOptions: {
        context: path.resolve(__dirname, '../other/'),
      },
    }),
    
  • docs: update readme
webdiscus
published 4.3.0 •

Changelog

Source

4.3.0 (2024-11-04)

  • feat: add preprocessor for Tempura template engine. Supports the static render and template function.
  • test: add test for the tempura preprocessor
  • docs: add documentation for Tempura
  • chore: add usage example
webdiscus
published 4.2.0 •

Changelog

Source

4.2.0 (2024-11-03)

  • feat: add support for Webpack >= 5.96 to correct inline images into CSS and HTML WARNING: Webpack version 5.96.0 introduces the BREAKING CHANGE in the CodeGenerationResults class!
  • feat: add support for Webpack >= 5.96 to correct CSS lazy loading WARNING: Webpack version 5.96.0 introduces the BREAKING CHANGE in the AssetGenerator class!
  • chore: update package and devel dependencies
  • test: update tests
webdiscus
published 4.1.4 •

Changelog

Source

4.1.4 (2024-11-01)

  • chore: update dependencies
webdiscus
published 4.1.3 •

Changelog

Source

4.1.3 (2024-10-28)

  • fix: if filesystem cache is used, webpack stats or errors are not displayed, #115
  • test: allow set the stats.preset webpack option to display stats info by testing
webdiscus
published 4.1.2 •

Changelog

Source

4.1.2 (2024-10-21)

  • fix: issue file is not resolved after start->stop->start in serve/watch mode when used cache filesystem, #114
  • chore: update dev packages
webdiscus
published 4.1.1 •

Changelog

Source

4.1.1 (2024-10-17)

  • fix: after 2-3 changes of the data file (global or entry), the dependent entry template is not recompiled.
  • test: add test for Eta preprocessor with default options
webdiscus
published 4.1.0 •

Changelog

Source

4.1.0 (2024-09-29)

  • feat: add supports the require of CommonJS and JSON files in EJS templates:
    <% const data = require('./data.js') %>
    <div>Film: <%= data.title %></div>
    <div>Genre: <%= data.genre %></div>
    
    or
    <% const data = require('./data.json') %>
    <div>Film: <%= data.title %></div>
    <div>Genre: <%= data.genre %></div>
    
  • chore: update peerDependencies
  • test: refactor test cases for preprocessor

<a id="v4-0-0" name="v4-0-0"></a>

webdiscus
published 4.0.0 •

Changelog

Source

4.0.0 Release (2024-09-08)

BREAKING CHANGES

  • Minimum supported Node.js version 18+.
    The plugin may works on the Node.js >= 16.20.0, but we can't test the plugin with outdated Node.js versions. GitHub CI test works only on Node.js >= 18. Many actual dev dependencies requires Node.js >= 18.

  • Minimum supported Webpack version 5.81+.

  • The plugin option property is not static anymore:

    OLD (up to v3.x)

    class MyPlugin extends HtmlBundlerPlugin {
      constructor(options = {}) {
        super({ ...options });
      }
      init(compiler) {
        // MyPlugin.option. ...; <= was as static property
      }
    }
    

    NEW (since v4.0)

    class MyPlugin extends HtmlBundlerPlugin {
      constructor(options = {}) {
        super({ ...options });
      }
      init(compiler) {
        // this.option. ...; <= now is non static property
      }
    }
    
  • Using the addProcess() plugin method is changed:

    OLD (up to v3.x)

    class MyPlugin extends HtmlBundlerPlugin {
      constructor(options = {}) {
        super({ ...options });
      }
      init(compiler) {
        // the method was as property of the static `option`
        MyPlugin.option.addProcess('postprocess', (content) => {
          return content;
        });
      }
    }
    

    NEW (since v4.0)

    class MyPlugin extends HtmlBundlerPlugin {
      constructor(options = {}) {
        super({ ...options });
      }
      init(compiler) {
        // now is the class method
        this.addProcess('postprocess', (content) => {
          return content;
        });
      }
    }
    

DEPRECATIONS

  • The watchFiles.files option has been renamed to watchFiles.includes.
    The files option is still supported but is deprecated. It's recommended to replace the files with includes in your config.

  • The watchFiles.ignore option has been renamed to watchFiles.excludes.
    The ignore option is still supported but is deprecated. It's recommended to replace the ignore with excludes in your config.

FEATURES

  • feat: add support the multiple webpack configuration:
const path = require('path');
const HtmlBundlerPlugin = require('@test/html-bundler-webpack-plugin');

module.exports = [
  {
    name: 'first',
    output: {
      path: path.join(__dirname, 'dist/web1/'),
    },
    plugins: [
      new HtmlBundlerPlugin({
        entry: {
          index: './web1/views/home.html',
        },
      }),
    ],
  },

  {
    name: 'second',
    output: {
      path: path.join(__dirname, 'dist/web2'),
    },
    plugins: [
      new HtmlBundlerPlugin({
        entry: {
          index: './web2/views/home.html',
        },
      }),
    ],
  },
];
  • feat: display webpack config name in console output:
    module.exports = {
      name: 'client', // <= this name will displayed in console output
    }
    

BUGFIX

  • fix: ERROR in RealContentHashPlugin in serv/watch mode after adding new import file
  • fix: when using integrity occurs ERROR in RealContentHashPlugin in serv/watch mode after changes by using dynamic import

MISC

  • refactor: rewrite all static classes to regular, this is needed to support webpack multiple configurations
  • refactor: code refactoring, invisible improvements
  • test: add testing for Node.js v22 on GitHub
  • test: add tests to improve the code coverage to 98%, 2% code can be tested only manual, e.g. in watch/serve mode after changes
  • chore: update dev packages, many packages requires Node.js >= v18
  • docs: update readme
webdiscus
published 3.17.4 •

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc