Skip to content

Commit

Permalink
admin: fixed alias script (#1494).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Oct 16, 2021
1 parent a5c6a46 commit 8f3d71d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc/admin/src.ts/cmds/esm-alias.ts
Expand Up @@ -52,7 +52,7 @@ async function alias(name: string): Promise<void> {
if (replace) {
inputFilename = replace;
transform = function(content: string) {
content = content.replace(/(\/\/# sourceMappingURL=)(.*)$/g, (all, prefix, mapFilename) => {
content = content.replace(/^(\/\/# sourceMappingURL=)(.*)$/mg, (all, prefix, mapFilename) => {
return prefix + filename + ".map";
});
return content;
Expand Down Expand Up @@ -132,7 +132,7 @@ async function alias(name: string): Promise<void> {
console.log(colorify.bold(`Aliasing Node ESM to Browser ESM...`));
const dirnames = getOrdered(true);
for (let i = 0; i < dirnames.length; i++) {
//if (dirnames[i] !== "base64") { continue; }
//if (dirnames[i] !== "signing-key") { continue; }
await alias(dirnames[i]);
}
})();

0 comments on commit 8f3d71d

Please sign in to comment.