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

inline-runtime-chunk-html-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-runtime-chunk-html-webpack-plugin

Inline Webpack's runtime chunks to the output html to save http request.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

inline-runtime-chunk-html-webpack-plugin

npm

Inline Webpack's runtime chunks to the output html to save http request. It requires html-webpack-plugin and Webpack 5.

Installation

npm install inline-runtime-chunk-html-webpack-plugin --save-dev

Usage

const HtmlWebpackPlugin = require('html-webpack-plugin');
const InlineRuntimeChunkPlugin = require('inline-runtime-chunk-html-webpack-plugin');

module.exports = {
  output: {
    // the default value of output.publicPath is "auto"
    // but it can\'t not automatically determine after inline runtime chunk within html
    // you can set publicPath to '' to get similar results
    publicPath: '',
    filename: '[name].[contenthash].js',
  },
  optimization: {
    // adds an additional chunk containing only the runtime to entrypoint
    runtimeChunk: 'single'
  },
  plugins: [
    new HtmlPlugin(),
    new InlineRuntimeChunkPlugin()
  ],
}

Keywords

webpack

FAQs

Package last updated on 02 Apr 2022

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