html-rspack-plugin
Advanced tools
+4
-0
@@ -502,2 +502,6 @@ // @ts-check | ||
| if (source.indexOf('__with_placeholder__') >= 0) { | ||
| source = source.replace('__with_placeholder__', 'with'); | ||
| } | ||
| // The LibraryTemplatePlugin stores the template result in a local variable. | ||
@@ -504,0 +508,0 @@ // By adding it to the end the value gets extracted during evaluation |
+3
-3
@@ -153,7 +153,7 @@ /* This loader renders the template with lodash.template if no other loader was found */ | ||
| // The following part renders the template with lodash as a minimalistic loader | ||
| // The `function __with_placeholder__` will be replaced with `with` in the next step | ||
| // to make the code compatible with SWC strict mode | ||
| const { compiled, isEscaping } = template(source); | ||
| // Use `eval("require")("lodash")` to enforce using the native nodejs require | ||
| // during template execution | ||
| return ` | ||
| module.exports = function (templateParams) { with(templateParams) { | ||
| module.exports = function (templateParams) { function __with_placeholder__(templateParams) { | ||
| ${isEscaping ? escapeCode : ''} | ||
@@ -160,0 +160,0 @@ // Execute the lodash template |
+1
-1
| { | ||
| "name": "html-rspack-plugin", | ||
| "version": "6.1.0", | ||
| "version": "6.1.1", | ||
| "license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Simplifies creation of HTML files to serve your Rspack bundles", |
109801
0.16%2561
0.12%