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

html-inject-common-chunk-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

html-inject-common-chunk-plugin

Insert public resources into the page

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

html-inject-common-chunk-plugin

A webpack Plugin. It must be used after [html-webpack-plugin] (https://github.com/jantimon/html-webpack-plugin)

Coverage Status

After using webpack4 splikChunk, the public chunk name is dynamically generated, so the html-webpack-plugin cannot insert the corresponding chunk into the html template. This plugin is to solve this problem

Installation

npm install html-webpack-plugin  --save-dev
npm install html-inject-common-chunk-plugin  --save-dev

webpack.config.js

const HtmlWebpackPlugin = require('html-webpack-plugin');
const InjectCommonChunk = require('html-inject-common-chunk-plugin');

module.exports = {
    ...
    plugins: [
        new HtmlWebpackPlugin({
            filename: '../htmlprod/index.html',
            template: './htmltpl/index.html',
            chunks: ['index']
        }),
        new InjectCommonChunk()
    ]
};

Keywords

webpack

FAQs

Package last updated on 20 Sep 2019

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