html-webpack-plugin
Advanced tools
Comparing version 5.5.1 to 5.5.2
@@ -6,2 +6,3 @@ // @ts-check | ||
'use strict'; | ||
/** | ||
@@ -14,3 +15,2 @@ * @file | ||
*/ | ||
'use strict'; | ||
@@ -17,0 +17,0 @@ let instanceId = 0; |
@@ -26,3 +26,3 @@ /* This loader renders the template with underscore if no other loader was found */ | ||
// Skip .js files (unless it's explicitly enforced) | ||
if (/\.js$/.test(this.resourcePath) && !force) { | ||
if (/\.(c|m)?js$/.test(this.resourcePath) && !force) { | ||
return source; | ||
@@ -34,5 +34,5 @@ } | ||
const template = _.template(source, { interpolate: /<%=([\s\S]+?)%>/g, variable: 'data', ...options }); | ||
// Use __non_webpack_require__ to enforce using the native nodejs require | ||
// Use `eval("require")("lodash")` to enforce using the native nodejs require | ||
// during template execution | ||
return 'var _ = __non_webpack_require__(' + JSON.stringify(require.resolve('lodash')) + ');' + | ||
return 'var _ = eval("require")(' + JSON.stringify(require.resolve('lodash')) + ');' + | ||
'module.exports = function (templateParams) { with(templateParams) {' + | ||
@@ -39,0 +39,0 @@ // Execute the lodash template |
{ | ||
"name": "html-webpack-plugin", | ||
"version": "5.5.1", | ||
"version": "5.5.2", | ||
"license": "MIT", | ||
@@ -47,3 +47,3 @@ "description": "Simplifies creation of HTML files to serve your webpack bundles", | ||
"typescript": "4.9.4", | ||
"webpack": "^5.79.0", | ||
"webpack": "^5.86.0", | ||
"webpack-cli": "4.5.0", | ||
@@ -50,0 +50,0 @@ "webpack-recompilation-simulator": "3.2.0" |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
116428
2234