Skip to content

Commit f40191c

Browse files
committed
Minor code cleanuip.
1 parent e0ef27f commit f40191c

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

webpack/set-webpack-public-path-plugin/src/SetPublicPathPlugin.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,7 @@ export class SetPublicPathPlugin implements Webpack.Plugin {
263263
.replace(/\[hash\]/g, options.chunk.renderedHash);
264264
}
265265
} else if (this.options.scriptName.useAssetName) {
266-
options.chunk[SHOULD_REPLACE_ASSET_NAME_TOKEN] = (
267-
this.options.scriptName &&
268-
!!this.options.scriptName.useAssetName
269-
);
266+
options.chunk[SHOULD_REPLACE_ASSET_NAME_TOKEN] = true;
270267

271268
moduleOptions.regexName = ASSET_NAME_TOKEN;
272269
}

webpack/set-webpack-public-path-plugin/src/codeGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function joinLines(lines: string[], linePrefix?: string): string {
3131
}).join(EOL).replace(new RegExp(`${EOL}${EOL}+`, 'g'), `${EOL}${EOL}`);
3232
}
3333

34-
export function escapeSingleQuotes(str: string): string | undefined {
34+
function escapeSingleQuotes(str: string): string | undefined {
3535
if (str) {
3636
return str.replace('\'', '\\\'');
3737
} else {

0 commit comments

Comments
 (0)