Skip to content

Commit d5bda22

Browse files
committed
fixing beautify errors
1 parent 56ac8eb commit d5bda22

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/BannerPlugin.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
const ConcatSource = require("webpack-sources").ConcatSource;
99
const ModuleFilenameHelpers = require("./ModuleFilenameHelpers");
1010

11-
function wrapComment(str) {
11+
const wrapComment = (str) => {
1212
if(!str.includes("\n")) return `/*! ${str} */`;
1313
return `/*!\n * ${str.split("\n").join("\n * ")}\n */`;
14-
}
14+
};
1515

1616
const REGEXP_HASH = /\[hash:?(\d+)?\]/gi,
1717
REGEXP_CHUNKHASH = /\[chunkhash:?(\d+)?\]/gi,
@@ -31,13 +31,13 @@ const withHashLength = (replacer, handlerFn) => {
3131
};
3232
};
3333

34-
function getReplacer(value) {
34+
const getReplacer = (value) => {
3535
return function(match) {
3636
return `${value}`;
3737
};
38-
}
38+
};
3939

40-
function interpolate(banner, file, hash, chunkHash) {
40+
const interpolate = (banner, file, hash, chunkHash) => {
4141
let name, ext;
4242
const splitPoint = file.lastIndexOf(".");
4343

@@ -54,7 +54,7 @@ function interpolate(banner, file, hash, chunkHash) {
5454
.replace(REGEXP_CHUNKHASH, withHashLength(getReplacer(chunkHash)))
5555
.replace(REGEXP_NAME, name)
5656
.replace(REGEXP_EXT, ext);
57-
}
57+
};
5858

5959
class BannerPlugin {
6060
constructor(options) {

0 commit comments

Comments
 (0)