You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

html-webpack-inject-temp-afteremit-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-webpack-inject-temp-afteremit-plugin

给打包后的html文件替换指定内容 using webpack, HTMLWebpackPlugin

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

替换文件内容插件

Installation

You must be running webpack on node 6.4 or higher

Install the plugin with npm:

$ npm install --save-dev html-webpack-inject-temp-afteremit-plugin

Install the plugin with yarn:

$ yarn add --dev html-webpack-inject-temp-afteremit-plugin

Basic Usage

Require the plugin in your webpack config:

var HtmlWebpackInjectTempalfterEmitPlugin = require('html-webpack-inject-temp-afteremit-plugin');

Add the plugin to your webpack config as follows:

{
	...
	plugins: [
	  new HtmlWebpackPlugin(),
	  new HtmlWebpackInjectTempalfterEmitPlugin({
		  targetStr: `替换成的内容`,
           sourceStr:`要替换的内容`
        }
	  })
	]
	...
}

开发

  • npm 包中 sudo npm link

  • 使用的npm中 sudo npm link package-name

Keywords

webpack

FAQs

Package last updated on 03 Aug 2020

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