html-webpack-plugin 4.2.2 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
# [4.3.0](https://github.com/jantimon/html-webpack-plugin/compare/v4.2.2...v4.3.0) (2020-04-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* Allow to use console.log inside templates ([c3f2fdc](https://github.com/jantimon/html-webpack-plugin/commit/c3f2fdc))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
5
14
|
## [4.2.2](https://github.com/jantimon/html-webpack-plugin/compare/v4.2.1...v4.2.2) (2020-04-30)
|
|
6
15
|
|
|
7
16
|
|
package/index.js
CHANGED
|
@@ -306,7 +306,7 @@ class HtmlWebpackPlugin {
|
|
|
306
306
|
// To extract the result during the evaluation this part has to be removed.
|
|
307
307
|
source = source.replace('var HTML_WEBPACK_PLUGIN_RESULT =', '');
|
|
308
308
|
const template = this.options.template.replace(/^.+!/, '').replace(/\?.+$/, '');
|
|
309
|
-
const vmContext = vm.createContext(_.extend({ HTML_WEBPACK_PLUGIN: true, require: require }, global));
|
|
309
|
+
const vmContext = vm.createContext(_.extend({ HTML_WEBPACK_PLUGIN: true, require: require, console: console }, global));
|
|
310
310
|
const vmScript = new vm.Script(source, { filename: template });
|
|
311
311
|
// Evaluate code and cast to string
|
|
312
312
|
let newSource;
|
package/package.json
CHANGED