This commit is contained in:
Noé Lebrun 2019-03-24 01:22:52 +01:00
parent e51c47abda
commit 99897ff87d
No known key found for this signature in database
GPG Key ID: 39636CE7E7775DE9
1 changed files with 5 additions and 3 deletions

View File

@ -41,9 +41,11 @@ class FunctionModuleTemplatePlugin {
const req = module.readableIdentifier(
moduleTemplate.runtimeTemplate.requestShortener
);
source.add("/*!****" + req.replace(/./g, "*") + "****!*\\\n");
source.add(" !*** " + req.replace(/\*\//g, "*_/") + " ***!\n");
source.add(" \\****" + req.replace(/./g, "*") + "****/\n");
const reqStr = req.replace(/\*\//g, "*_/");
const reqStrStar = "*".repeat(reqStr.length);
source.add("/*!****" + reqStrStar + "****!*\\\n");
source.add(" !*** " + reqStr + " ***!\n");
source.add(" \\****" + reqStrStar + "****/\n");
if (
Array.isArray(module.buildMeta.providedExports) &&
module.buildMeta.providedExports.length === 0