html-webpack-plugin 3.0.7 → 4.0.0-alpha

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.
@@ -1,137 +1,47 @@
1
+ // @ts-check
2
+ /** @typedef {import("webpack/lib/Compilation.js")} WebpackCompilation */
1
3
  'use strict';
2
4
 
3
- const toposort = require('toposort');
4
- const _ = require('lodash');
5
+ // Import webpack types using commonjs
6
+ // As we use only the type we have to prevent warnings about unused varaibles
7
+ /* eslint-disable */
8
+ const WebpackCompilation = require('webpack/lib/Compilation');
9
+ /* eslint-enable */
5
10
 
6
11
  /**
7
- Sorts dependencies between chunks by their "parents" attribute.
8
-
9
- This function sorts chunks based on their dependencies with each other.
10
- The parent relation between chunks as generated by Webpack for each chunk
11
- is used to define a directed (and hopefully acyclic) graph, which is then
12
- topologically sorted in order to retrieve the correct order in which
13
- chunks need to be embedded into HTML. A directed edge in this graph is
14
- describing a "is parent of" relationship from a chunk to another (distinct)
15
- chunk. Thus topological sorting orders chunks from bottom-layer chunks to
16
- highest level chunks that use the lower-level chunks.
17
-
18
- @param {Array} chunks an array of chunks as generated by the html-webpack-plugin.
19
- - For webpack < 4, It is assumed that each entry contains at least the properties
20
- "id" (containing the chunk id) and "parents" (array containing the ids of the
21
- parent chunks).
22
- - For webpack 4+ the see the chunkGroups param for parent-child relationships
23
-
24
- @param {Array} chunks an array of ChunkGroups that has a getParents method.
25
- Each ChunkGroup contains a list of chunks in order.
26
-
27
- @return {Array} A topologically sorted version of the input chunks
28
- */
29
- module.exports.dependency = (chunks, chunkGroups) => {
30
- if (!chunks) {
31
- return chunks;
32
- }
33
-
34
- // We build a map (chunk-id -> chunk) for faster access during graph building.
35
- const nodeMap = {};
36
-
37
- chunks.forEach(chunk => {
38
- nodeMap[chunk.id] = chunk;
39
- });
40
-
41
- // Next, we add an edge for each parent relationship into the graph
42
- let edges = [];
43
-
44
- if (chunkGroups) {
45
- // Add an edge for each parent (parent -> child)
46
- edges = chunkGroups.reduce((result, chunkGroup) => result.concat(
47
- Array.from(chunkGroup.parentsIterable, parentGroup => [parentGroup, chunkGroup])
48
- ), []);
49
- const sortedGroups = toposort.array(chunkGroups, edges);
50
- // flatten chunkGroup into chunks
51
- const sortedChunks = sortedGroups
52
- .reduce((result, chunkGroup) => result.concat(chunkGroup.chunks), [])
53
- .map(chunk => // use the chunk from the list passed in, since it may be a filtered list
54
- nodeMap[chunk.id])
55
- .filter((chunk, index, self) => {
56
- // make sure exists (ie excluded chunks not in nodeMap)
57
- const exists = !!chunk;
58
- // make sure we have a unique list
59
- const unique = self.indexOf(chunk) === index;
60
- return exists && unique;
61
- });
62
- return sortedChunks;
63
- } else {
64
- // before webpack 4 there was no chunkGroups
65
- chunks.forEach(chunk => {
66
- if (chunk.parents) {
67
- // Add an edge for each parent (parent -> child)
68
- chunk.parents.forEach(parentId => {
69
- // webpack2 chunk.parents are chunks instead of string id(s)
70
- const parentChunk = _.isObject(parentId) ? parentId : nodeMap[parentId];
71
- // If the parent chunk does not exist (e.g. because of an excluded chunk)
72
- // we ignore that parent
73
- if (parentChunk) {
74
- edges.push([parentChunk, chunk]);
75
- }
76
- });
77
- }
78
- });
79
- // We now perform a topological sorting on the input chunks and built edges
80
- return toposort.array(chunks, edges);
81
- }
82
- };
83
-
84
- /**
85
- * Sorts the chunks based on the chunk id.
86
- *
87
- * @param {Array} chunks the list of chunks to sort
88
- * @return {Array} The sorted list of chunks
12
+ * @type {{[sortmode: string] : (entryPointNames: Array<string>, compilation, htmlWebpackPluginOptions) => Array<string> }}
13
+ * This file contains different sort methods for the entry chunks names
89
14
  */
90
- module.exports.id = chunks => chunks.sort(function orderEntryLast (a, b) {
91
- if (a.entry !== b.entry) {
92
- return b.entry ? 1 : -1;
93
- } else {
94
- return b.id - a.id;
95
- }
96
- });
15
+ const sortFunctions = {};
16
+ module.exports = sortFunctions;
97
17
 
98
18
  /**
99
19
  * Performs identity mapping (no-sort).
100
20
  * @param {Array} chunks the chunks to sort
101
21
  * @return {Array} The sorted chunks
102
22
  */
103
- module.exports.none = chunks => chunks;
23
+ sortFunctions.none = chunks => chunks;
104
24
 
105
25
  /**
106
26
  * Sort manually by the chunks
107
- * @param {Array} chunks the chunks to sort
108
- * @return {Array} The sorted chunks
27
+ * @param {string[]} entryPointNames the chunks to sort
28
+ * @param {WebpackCompilation} compilation the webpack compilation
29
+ * @param htmlWebpackPluginOptions the plugin options
30
+ * @return {string[]} The sorted chunks
109
31
  */
110
- module.exports.manual = (chunks, specifyChunks) => {
111
- const chunksResult = [];
112
- let filterResult = [];
113
- if (Array.isArray(specifyChunks)) {
114
- for (var i = 0; i < specifyChunks.length; i++) {
115
- filterResult = chunks.filter(chunk => {
116
- if (chunk.names[0] && chunk.names[0] === specifyChunks[i]) {
117
- return true;
118
- }
119
- return false;
120
- });
121
- filterResult.length > 0 && chunksResult.push(filterResult[0]);
122
- }
32
+ sortFunctions.manual = (entryPointNames, compilation, htmlWebpackPluginOptions) => {
33
+ const chunks = htmlWebpackPluginOptions.chunks;
34
+ if (!Array.isArray(chunks)) {
35
+ return entryPointNames;
123
36
  }
124
- return chunksResult;
37
+ // Remove none existing entries from
38
+ // htmlWebpackPluginOptions.chunks
39
+ return chunks.filter((entryPointName) => {
40
+ return compilation.entrypoints.has(entryPointName);
41
+ });
125
42
  };
126
43
 
127
44
  /**
128
45
  * Defines the default sorter.
129
46
  */
130
- module.exports.auto = module.exports.id;
131
-
132
- // In webpack 2 the ids have been flipped.
133
- // Therefore the id sort doesn't work the same way as it did for webpack 1
134
- // Luckily the dependency sort is working as expected
135
- if (Number(require('webpack/package.json').version.split('.')[0]) > 1) {
136
- module.exports.auto = module.exports.dependency;
137
- }
47
+ sortFunctions.auto = module.exports.none;
package/lib/compiler.js CHANGED
@@ -46,15 +46,20 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
46
46
  new NodeTemplatePlugin(outputOptions).apply(childCompiler);
47
47
  new NodeTargetPlugin().apply(childCompiler);
48
48
  new LibraryTemplatePlugin('HTML_WEBPACK_PLUGIN_RESULT', 'var').apply(childCompiler);
49
- new SingleEntryPlugin(this.context, template, compilerName).apply(childCompiler);
49
+
50
+ // Using undefined as name for the SingleEntryPlugin causes a unexpected output as described in
51
+ // https://github.com/jantimon/html-webpack-plugin/issues/895
52
+ // Using a string as a name for the SingleEntryPlugin causes problems with HMR as described in
53
+ // https://github.com/jantimon/html-webpack-plugin/issues/900
54
+ // Until the HMR issue is fixed we keep the ugly output:
55
+ new SingleEntryPlugin(this.context, template, undefined).apply(childCompiler);
56
+
50
57
  new LoaderTargetPlugin('node').apply(childCompiler);
51
58
 
52
59
  // Fix for "Uncaught TypeError: __webpack_require__(...) is not a function"
53
60
  // Hot module replacement requires that every child compiler has its own
54
61
  // cache. @see https://github.com/ampedandwired/html-webpack-plugin/pull/179
55
-
56
- // Backwards compatible version of: childCompiler.hooks.compilation
57
- (childCompiler.hooks ? childCompiler.hooks.compilation.tap.bind(childCompiler.hooks.compilation, 'HtmlWebpackPlugin') : childCompiler.plugin.bind(childCompiler, 'compilation'))(compilation => {
62
+ childCompiler.hooks.compilation.tap('HtmlWebpackPlugin', compilation => {
58
63
  if (compilation.cache) {
59
64
  if (!compilation.cache[compilerName]) {
60
65
  compilation.cache[compilerName] = {};
@@ -74,19 +79,10 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
74
79
  reject(err);
75
80
  } else {
76
81
  // Replace [hash] placeholders in filename
77
- // In webpack 4 the plugin interface changed, so check for available fns
78
- const outputName = compilation.mainTemplate.getAssetPath
79
- ? compilation.mainTemplate.hooks.assetPath.call(outputOptions.filename, {
80
- hash: childCompilation.hash,
81
- chunk: entries[0]
82
- })
83
- : compilation.mainTemplate.applyPluginsWaterfall(
84
- 'asset-path',
85
- outputOptions.filename,
86
- {
87
- hash: childCompilation.hash,
88
- chunk: entries[0]
89
- });
82
+ const outputName = compilation.mainTemplate.hooks.assetPath.call(outputOptions.filename, {
83
+ hash: childCompilation.hash,
84
+ chunk: entries[0]
85
+ });
90
86
 
91
87
  // Restore the parent compilation to the state like it
92
88
  // was before the child compilation
package/lib/errors.js CHANGED
@@ -1,8 +1,9 @@
1
+ // @ts-nocheck
1
2
  'use strict';
2
3
  const PrettyError = require('pretty-error');
3
4
  const prettyError = new PrettyError();
4
5
  prettyError.withoutColors();
5
- prettyError.skipPackage(['html-plugin-evaluation']);
6
+ prettyError.skipPackage('html-plugin-evaluation');
6
7
  prettyError.skipNodeFiles();
7
8
  prettyError.skip(function (traceLine) {
8
9
  return traceLine.path === 'html-plugin-evaluation';
package/lib/hooks.js ADDED
@@ -0,0 +1,132 @@
1
+ // @ts-check
2
+ /* eslint-disable */
3
+ /// <reference path="../typings.d.ts" />
4
+ /* eslint-enable */
5
+ 'use strict';
6
+ /**
7
+ * This file provides access to all public htmlWebpackPlugin hooks
8
+ *
9
+ * Usage:
10
+ * ```js
11
+ * const getHtmlWebpackPluginHooks = require('html-webpack-plugin/lib/hooks').getHtmlWebpackPluginHooks;
12
+ *
13
+ * compiler.hooks.compilation.tap('YOUR_PLUGIN_NAME', (compilation) => {
14
+ * const htmlWebpackPluginHooks = getHtmlWebpackPluginHooks(compilation);
15
+ * htmlWebpackPluginHooks.htmlWebpackPluginAfterEmit.tap('YOUR_PLUGIN_NAME', (pluginArgs) => {
16
+ * // your code
17
+ * });
18
+ * });
19
+ * ```
20
+ */
21
+
22
+ /** @typedef {import("webpack/lib/Compilation.js")} WebpackCompilation */
23
+ /** @typedef {import("../index.js")} HtmlWebpackPlugin */
24
+
25
+ const AsyncSeriesWaterfallHook = require('tapable').AsyncSeriesWaterfallHook;
26
+
27
+ // The following typedef holds the API definition for all available hooks
28
+ // to allow easier access when using ts-check or typescript inside plugins
29
+ /** @typedef {{
30
+ htmlWebpackPluginBeforeHtmlGeneration:
31
+ AsyncSeriesWaterfallHook<{
32
+ assets: {
33
+ publicPath: string,
34
+ js: Array<{entryName: string, path: string}>,
35
+ css: Array<{entryName: string, path: string}>,
36
+ },
37
+ outputName: string,
38
+ plugin: HtmlWebpackPlugin
39
+ }>,
40
+ htmlWebpackPluginBeforeHtmlProcessing:
41
+ AsyncSeriesWaterfallHook<{
42
+ html: string,
43
+ assets: {
44
+ publicPath: string,
45
+ js: Array<{entryName: string, path: string}>,
46
+ css: Array<{entryName: string, path: string}>,
47
+ },
48
+ outputName: string,
49
+ plugin: HtmlWebpackPlugin,
50
+ }>,
51
+ htmlWebpackPluginAfterHtmlProcessing:
52
+ AsyncSeriesWaterfallHook<{
53
+ html: string,
54
+ assets: {
55
+ publicPath: string,
56
+ js: Array<{entryName: string, path: string}>,
57
+ css: Array<{entryName: string, path: string}>,
58
+ },
59
+ outputName: string,
60
+ plugin: HtmlWebpackPlugin,
61
+ }>,
62
+ htmlWebpackPluginAlterAssetTags:
63
+ AsyncSeriesWaterfallHook<{
64
+ head: Array<HtmlTagObject>,
65
+ body: Array<HtmlTagObject>,
66
+ outputName: string,
67
+ plugin: HtmlWebpackPlugin
68
+ }>,
69
+ htmlWebpackPluginAfterEmit:
70
+ AsyncSeriesWaterfallHook<{
71
+ html: string,
72
+ outputName: string,
73
+ plugin: HtmlWebpackPlugin
74
+ }>,
75
+ }} HtmlWebpackPluginHooks
76
+ */
77
+
78
+ /**
79
+ * Returns all public hooks of the html webpack plugin for the given compilation
80
+ *
81
+ * @param {WebpackCompilation} compilation
82
+ * @returns {HtmlWebpackPluginHooks}
83
+ */
84
+ function getHtmlWebpackPluginHooks (compilation) {
85
+ /** @type {HtmlWebpackPluginHooks} */
86
+ const hooks = compilation.hooks;
87
+ // Setup the hooks only once
88
+ if (!hooks.htmlWebpackPluginAfterEmit) {
89
+ attachHooksToCompilation(compilation);
90
+ }
91
+ return {
92
+ htmlWebpackPluginBeforeHtmlGeneration: hooks.htmlWebpackPluginBeforeHtmlGeneration,
93
+ htmlWebpackPluginBeforeHtmlProcessing: hooks.htmlWebpackPluginBeforeHtmlProcessing,
94
+ htmlWebpackPluginAlterAssetTags: hooks.htmlWebpackPluginAlterAssetTags,
95
+ htmlWebpackPluginAfterHtmlProcessing: hooks.htmlWebpackPluginAfterHtmlProcessing,
96
+ htmlWebpackPluginAfterEmit: hooks.htmlWebpackPluginAfterEmit
97
+ };
98
+ }
99
+
100
+ /**
101
+ * Add hooks to the webpack compilation object to allow foreign plugins to
102
+ * extend the HtmlWebpackPlugin
103
+ *
104
+ * @param {WebpackCompilation} compilation
105
+ */
106
+ function attachHooksToCompilation (compilation) {
107
+ /** @type {HtmlWebpackPluginHooks} */
108
+ const hooks = compilation.hooks;
109
+ hooks.htmlWebpackPluginBeforeHtmlGeneration = new AsyncSeriesWaterfallHook(['pluginArgs']);
110
+ hooks.htmlWebpackPluginBeforeHtmlProcessing = new AsyncSeriesWaterfallHook(['pluginArgs']);
111
+ hooks.htmlWebpackPluginAlterAssetTags = new AsyncSeriesWaterfallHook(['pluginArgs']);
112
+ hooks.htmlWebpackPluginAfterHtmlProcessing = new AsyncSeriesWaterfallHook(['pluginArgs']);
113
+ hooks.htmlWebpackPluginAfterEmit = new AsyncSeriesWaterfallHook(['pluginArgs']);
114
+ }
115
+
116
+ /**
117
+ * Small workaround helper to work around https://github.com/Microsoft/TypeScript/issues/1178
118
+ * Returns the hook of the given name
119
+ *
120
+ * @type {
121
+ <T extends keyof HtmlWebpackPluginHooks>(compilation: WebpackCompilation, hookName: T) => HtmlWebpackPluginHooks[T]
122
+ }
123
+ */
124
+ const getHtmlWebpackPluginHook = (compilation, hookName) => {
125
+ const hooks = getHtmlWebpackPluginHooks(compilation);
126
+ return /** @type {any} */hooks[hookName];
127
+ };
128
+
129
+ module.exports = {
130
+ getHtmlWebpackPluginHooks,
131
+ getHtmlWebpackPluginHook
132
+ };
@@ -0,0 +1,73 @@
1
+ // @ts-check
2
+ /* eslint-disable */
3
+ /// <reference path="../typings.d.ts" />
4
+ /* eslint-enable */
5
+ /**
6
+ * @file
7
+ * This file provides to helper to create html as a object repesentation as
8
+ * thoses objects are easier to modify than pure string representations
9
+ *
10
+ * Usage:
11
+ * ```
12
+ * const element = createHtmlTagObject('h1', {class: 'demo'}, 'Hello World');
13
+ * const html = htmlTagObjectToString(element);
14
+ * console.log(html) // -> <h1 class="demo">Hello World</h1>
15
+ * ```
16
+ */
17
+
18
+ /**
19
+ * All html tag elements which must not contain innerHTML
20
+ * @see https://www.w3.org/TR/html5/syntax.html#void-elements
21
+ */
22
+ const voidTags = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
23
+
24
+ /**
25
+ * Turn a tag definition into a html string
26
+ * @param {HtmlTagObject} tagDefinition
27
+ * A tag element according to the htmlWebpackPlugin object notation
28
+ *
29
+ * @param xhtml {boolean}
30
+ * Wether the generated html should add closing slashes to be xhtml compliant
31
+ */
32
+ function htmlTagObjectToString (tagDefinition, xhtml) {
33
+ const attributes = Object.keys(tagDefinition.attributes || {})
34
+ .filter(function (attributeName) {
35
+ return tagDefinition.attributes[attributeName] !== false;
36
+ })
37
+ .map(function (attributeName) {
38
+ if (tagDefinition.attributes[attributeName] === true) {
39
+ return xhtml ? attributeName + '="' + attributeName + '"' : attributeName;
40
+ }
41
+ return attributeName + '="' + tagDefinition.attributes[attributeName] + '"';
42
+ });
43
+ return '<' + [tagDefinition.tagName].concat(attributes).join(' ') + (tagDefinition.voidTag && xhtml ? '/' : '') + '>' +
44
+ (tagDefinition.innerHTML || '') +
45
+ (tagDefinition.voidTag ? '' : '</' + tagDefinition.tagName + '>');
46
+ }
47
+
48
+ /**
49
+ * Static helper to create a tag object to be get injected into the dom
50
+ *
51
+ * @param {string} tagName
52
+ * the name of the tage e.g. 'div'
53
+ *
54
+ * @param {{[attributeName: string]: string|boolean}} [attributes]
55
+ * tag attributes e.g. `{ 'class': 'example', disabled: true }`
56
+ *
57
+ * @param {string} [innerHTML]
58
+ *
59
+ * @returns {HtmlTagObject}
60
+ */
61
+ function createHtmlTagObject (tagName, attributes, innerHTML) {
62
+ return {
63
+ tagName: tagName,
64
+ voidTag: voidTags.indexOf(tagName) !== -1,
65
+ attributes: attributes || {},
66
+ innerHTML: innerHTML
67
+ };
68
+ }
69
+
70
+ module.exports = {
71
+ createHtmlTagObject: createHtmlTagObject,
72
+ htmlTagObjectToString: htmlTagObjectToString
73
+ };
package/lib/loader.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* This loader renders the template with underscore if no other loader was found */
2
+ // @ts-nocheck
2
3
  'use strict';
3
-
4
4
  const _ = require('lodash');
5
5
  const loaderUtils = require('loader-utils');
6
6
 
@@ -21,31 +21,15 @@ module.exports = function (source) {
21
21
  return source;
22
22
  }
23
23
 
24
- // The following part renders the tempalte with lodash as aminimalistic loader
24
+ // The following part renders the template with lodash as aminimalistic loader
25
25
  //
26
26
  // Get templating options
27
- const options = this.query !== '' ? loaderUtils.parseQuery(this.query) : {};
28
- // Webpack 2 does not allow with() statements, which lodash templates use to unwrap
29
- // the parameters passed to the compiled template inside the scope. We therefore
30
- // need to unwrap them ourselves here. This is essentially what lodash does internally
31
- // To tell lodash it should not use with we set a variable
32
- const template = _.template(source, _.defaults(options, { variable: 'data' }));
33
- // All templateVariables which should be available
34
- // @see HtmlWebpackPlugin.prototype.executeTemplate
35
- const templateVariables = [
36
- 'compilation',
37
- 'webpack',
38
- 'webpackConfig',
39
- 'htmlWebpackPlugin'
40
- ];
41
- return 'var _ = require(' + loaderUtils.stringifyRequest(this, require.resolve('lodash')) + ');' +
42
- 'module.exports = function (templateParams) {' +
43
- // Declare the template variables in the outer scope of the
44
- // lodash template to unwrap them
45
- templateVariables.map(function (variableName) {
46
- return 'var ' + variableName + ' = templateParams.' + variableName;
47
- }).join(';') + ';' +
27
+ const options = this.query !== '' ? loaderUtils.getOptions(this) : {};
28
+ const template = _.template(source, _.defaults(options, { interpolate: /<%=([\s\S]+?)%>/g, variable: 'data' }));
29
+ // Require !!lodash - using !! will disable all loaders (e.g. babel)
30
+ return 'var _ = require(' + loaderUtils.stringifyRequest(this, '!!' + require.resolve('lodash')) + ');' +
31
+ 'module.exports = function (templateParams) { with(templateParams) {' +
48
32
  // Execute the lodash template
49
33
  'return (' + template.source + ')();' +
50
- '}';
34
+ '}}';
51
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-webpack-plugin",
3
- "version": "3.0.7",
3
+ "version": "4.0.0-alpha",
4
4
  "license": "MIT",
5
5
  "description": "Simplifies creation of HTML files to serve your webpack bundles",
6
6
  "author": "Charles Blaxland <charles.blaxland@gmail.com> (https://github.com/ampedandwired)",
@@ -12,6 +12,8 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "pretest": "semistandard",
15
+ "posttest": "tsc --pretty",
16
+ "commit": "git-cz",
15
17
  "build-examples": "node examples/build-examples.js",
16
18
  "test": "jasmine",
17
19
  "release": "standard-version"
@@ -22,11 +24,13 @@
22
24
  ]
23
25
  },
24
26
  "devDependencies": {
27
+ "@types/node": "10.1.1",
25
28
  "appcache-webpack-plugin": "^1.3.0",
29
+ "commitizen": "2.9.6",
26
30
  "css-loader": "^0.26.1",
31
+ "cz-conventional-changelog": "2.1.0",
27
32
  "dir-compare": "1.3.0",
28
- "es6-promise": "^4.0.5",
29
- "extract-text-webpack-plugin": "^1.0.1",
33
+ "extract-text-webpack-plugin": "^4.0.0-beta.0",
30
34
  "file-loader": "^0.9.0",
31
35
  "html-loader": "^0.4.4",
32
36
  "jade": "^1.11.0",
@@ -37,22 +41,24 @@
37
41
  "semistandard": "8.0.0",
38
42
  "standard-version": "^4.3.0",
39
43
  "style-loader": "^0.13.1",
44
+ "typescript": "2.9.0-dev.20180518",
40
45
  "underscore-template-loader": "^0.7.3",
41
46
  "url-loader": "^0.5.7",
42
- "webpack": "^1.14.0",
47
+ "webpack": "4.8.3",
48
+ "webpack-cli": "2.0.12",
43
49
  "webpack-recompilation-simulator": "^1.3.0"
44
50
  },
45
51
  "dependencies": {
52
+ "@types/tapable": "1.0.2",
46
53
  "html-minifier": "^3.2.3",
47
- "loader-utils": "^0.2.16",
48
- "lodash": "^4.17.3",
54
+ "loader-utils": "^1.1.0",
55
+ "lodash": "^4.17.10",
49
56
  "pretty-error": "^2.0.2",
50
57
  "tapable": "^1.0.0",
51
- "toposort": "^1.0.0",
52
58
  "util.promisify": "1.0.0"
53
59
  },
54
60
  "peerDependencies": {
55
- "webpack": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
61
+ "webpack": "^4.0.0"
56
62
  },
57
63
  "keywords": [
58
64
  "webpack",
@@ -64,6 +70,11 @@
64
70
  "homepage": "https://github.com/jantimon/html-webpack-plugin",
65
71
  "repository": "https://github.com/jantimon/html-webpack-plugin.git",
66
72
  "engines": {
67
- "node": ">=6.11.5"
73
+ "node": ">=6.9"
74
+ },
75
+ "config": {
76
+ "commitizen": {
77
+ "path": "./node_modules/cz-conventional-changelog"
78
+ }
68
79
  }
69
80
  }