New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hwp-inline-runtime-chunk-plugin

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hwp-inline-runtime-chunk-plugin

Plugin to inline WebPack runtime chunks when using html-webpack-plugin

latest
Source
npmnpm
Version
2.0.6
Version published
Maintainers
0
Created
Source

hwp-inline-runtime-chunk-plugin

CI

This plugin automatically inline Webpack's runtime chunks. It requires html-webpack-plugin

This plugin was inspired by html-webpack-inline-runtime-plugin and does pretty much the same but differently.

There are a few differences though:

  • hwp-inline-runtime-chunk-plugin does not calculate integrity hashes (and therefore does not inject the CSP meta tag): the plugin must do one thing, and do it well.
  • hwp-inline-runtime-chunk-plugin has an option (off by default) to strip the source map from the inlined runtime chunk.
  • hwp-inline-runtime-chunk-plugin tries to handle all corner cases, and has an extensive test suite.

Installation

npm install --save-dev hwp-inline-runtime-chunk-plugin

Usage

const HtmlWebpackPlugin = require('html-webpack-plugin');
const { HwpInlineRuntimeChunkPlugin } = require('hwp-inline-runtime-chunk-plugin');

module.exports = {
  optimization: {
    runtimeChunk: 'single'
  },
  plugins: [
    new HtmlWebpackPlugin(),
    new HwpInlineRuntimeChunkPlugin({ removeSourceMap: true })
  ]
};

The plugin currently has only one configuration option:

  • removeSourceMap (Boolean, the default is false): whether to remove the link to the source map from the inlined source

Keywords

webpack

FAQs

Package last updated on 30 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts