New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html_webpack_plugin_alter_asset_mount-stzhang

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html_webpack_plugin_alter_asset_mount-stzhang - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

15

libs/index.js

@@ -9,3 +9,16 @@ const pkg = require('../package.json');

if (compilation.hooks) { // webpack 4
compilation.hooks.htmlWebpackPluginAlterAssetTags.tap(pkg.name, htmlPluginData => this.handle(htmlPluginData));
if (typeof compilation.hooks.htmlWebpackPluginAlterAssetTags === 'object') {
compilation.hooks.htmlWebpackPluginAlterAssetTags.tap(pkg.name, htmlPluginData => this.handle(htmlPluginData));
} else {
const HtmlWebpackPlugin = require('html-webpack-plugin');
HtmlWebpackPlugin.getHooks(compilation).alterAssetTagGroups.tap(pkg.name, ({headTags, bodyTags, ...rest}) => {
const {chunks} = compilation.getStats().toJson({chunks: true});
this.handle({
head: headTags,
body: bodyTags,
chunks,
...rest
});
});
}
} else { // webpack 3

@@ -12,0 +25,0 @@ compilation.plugin('html-webpack-plugin-alter-asset-tags', (htmlPluginData, callback) => {

2

package.json
{
"name": "html_webpack_plugin_alter_asset_mount-stzhang",
"version": "1.0.0",
"version": "1.0.1",
"description": "微调 html-webpack-plugin 插件注入 script 标签在html模板内的位置",

@@ -5,0 +5,0 @@ "main": "libs/index.js",

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