Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Commit 30faa2c

Browse files
committed
minor formatting
1 parent 7ec9f78 commit 30faa2c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
'use strict';
2+
23
function HtmlWebpackMultiBuildPlugin(options) {
34
this.options = options;
45
this.outputFileNameRegex = [];
56
this.js = [];
67
}
78

89
HtmlWebpackMultiBuildPlugin.prototype = {
9-
apply: function(compiler) {
10+
apply: function(compiler) {
1011
this.createOutputRegexes(compiler.options);
1112

1213
if (compiler.hooks) {
@@ -24,15 +25,15 @@ HtmlWebpackMultiBuildPlugin.prototype = {
2425
}
2526
},
2627

27-
beforeHtmlGeneration: function(data, cb) {
28+
beforeHtmlGeneration: function(data, cb) {
2829
this.clearOldScripts(data);
2930
this.js = this.js.concat(data.assets.js);
3031
data.assets.js = this.js;
3132
data.plugin.options.modernScripts = this.js.filter(value => value.indexOf('legacy') === -1);
3233
data.plugin.options.legacyScripts = this.js.filter(value => value.indexOf('legacy') > 0);
3334
cb(null, data);
3435
},
35-
createOutputRegexes: function(options) {
36+
createOutputRegexes: function(options) {
3637
if (options.output && options.output.filename) {
3738
// default webpack entry
3839
let entry = ['main'];
@@ -54,10 +55,8 @@ HtmlWebpackMultiBuildPlugin.prototype = {
5455
}
5556
});
5657
}
57-
58-
console.log(this.outputFileNameRegex);
5958
},
60-
clearOldScripts: function(data) {
59+
clearOldScripts: function(data) {
6160
this.outputFileNameRegex.forEach(r => {
6261
data.assets.js.forEach(a => {
6362
// we have one of our entries

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /