Use ESM version of parsers in bundles (#13505)

This commit is contained in:
fisker Cheung authored and GitHub committed 2022-09-23 19:26:13 +08:00
1 parent 1569db783b
commit 08620b41eb
1 file changed
+4
+4
View File
@@ -106,6 +106,10 @@ function* getEsbuildOptions(bundle, buildOptions) {
output = "./esm/doc.mjs"; output = "./esm/doc.mjs";
} }
if (output.startsWith("./parser-")) {
output = `./esm/${output.slice(2).replace(".js", ".mjs")}`;
}
replaceModule.push({ module: input, external: output }); replaceModule.push({ module: input, external: output });
} }
} else { } else {