Socket
Socket
Sign inDemoInstall

script-ext-html-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

script-ext-html-webpack-plugin - npm Package Compare versions

Comparing version 1.8.2 to 1.8.3

9

lib/async-chunk-resource-hints.js

@@ -37,10 +37,7 @@ 'use strict';

const publicPath = getPublicPath(options);
if (publicPath) {
const prefix = publicPath.endsWith('/') ? publicPath : publicPath + '/';
return file => prefix + file;
} else {
return file => file;
}
return publicPath
? file => publicPath + file
: file => file;
};
module.exports = addAsyncChunkResourceHints;
'use strict';
const debug = require('debug')('ScriptExt');
const separator = require('path').sep;

@@ -11,6 +12,11 @@ const isScript = (tag) => tag.tagName === 'script';

const getPublicPath = options =>
(options.compilationOptions.output && options.compilationOptions.output.publicPath)
? options.compilationOptions.output.publicPath
: undefined;
const getPublicPath = options => {
const output = options.compilationOptions.output;
if (output) {
let publicPath = output.publicPath;
if (publicPath) {
return publicPath.endsWith(separator) ? publicPath : publicPath + separator;
}
}
};

@@ -17,0 +23,0 @@ const getScriptName = (options, tag) => {

{
"name": "script-ext-html-webpack-plugin",
"version": "1.8.2",
"version": "1.8.3",
"description": "Enhances html-webpack-plugin functionality with async and defer attributes for script elements",

@@ -12,7 +12,8 @@ "main": "index.js",

"pretest": "semistandard & install-module-versions dynavers.json",
"test": "VERSION=webpack1 jasmine && VERSION=webpack2 jasmine",
"test": "VERSION=webpack1 jasmine && VERSION=webpack2 jasmine && VERSION=webpack3 jasmine",
"test:webpack1": "VERSION=webpack1 jasmine",
"test:webpack2": "VERSION=webpack2 jasmine",
"debug": "DEBUG=ScriptExt VERSION=webpack2 jasmine",
"node-debug": "DEBUG=ScriptExt VERSION=webpack1 node-debug jasmine"
"test:webpack3": "VERSION=webpack3 jasmine",
"debug": "DEBUG=ScriptExt VERSION=webpack3 jasmine",
"node-debug": "DEBUG=ScriptExt VERSION=webpack3 node-debug jasmine"
},

@@ -19,0 +20,0 @@ "repository": {

@@ -294,3 +294,4 @@ Script Extension for HTML Webpack Plugin

* compatible with [webpack-config](https://www.npmjs.com/package/webpack-config) - thank s @avaly
* node v8+ testing
* node v8+ and webback 3.x testing
* resource hints handle public paths without end separators (thanks @albv)

@@ -297,0 +298,0 @@ v1.7.x

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