script-ext-html-webpack-plugin
Advanced tools
Comparing version 1.4.0 to 1.4.1
10
index.js
@@ -20,2 +20,3 @@ 'use strict'; | ||
}; | ||
const PUBLIC_PATH_PREFIX = /^.*\//; | ||
@@ -78,3 +79,10 @@ const shouldUpdateElements = (options) => { | ||
const getScriptName = (tag) => tag.attributes.src; | ||
const getScriptName = (tag) => { | ||
let scriptName = tag.attributes.src; | ||
// remove publicPath prefix | ||
if (scriptName.indexOf('/') > -1) { | ||
scriptName = scriptName.replace(PUBLIC_PATH_PREFIX, ''); | ||
} | ||
return scriptName; | ||
}; | ||
@@ -81,0 +89,0 @@ const updateSrcElement = (options, tag) => { |
{ | ||
"name": "script-ext-html-webpack-plugin", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Enhances html-webpack-plugin functionality with async and defer attributes for script elements", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15537
133