Parse Prettier config with yaml (#17410)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
fisker Cheungandautofix-ci[bot] authored and GitHub committed 2025-05-06 08:18:50 +08:00
1 parent 8860046468
commit 38dc5dee18
8 files changed
+46 -29

No files matched your search

+10
View File
@@ -202,6 +202,16 @@ function getEsbuildOptions({ packageConfig, file, cliOptions }) {
);
}
// Current version of `yaml` is not tree-shakable,
// but when we update it, we may reduce size,
// since the UMD version don't need expose `__parsePrettierYamlConfig`
if (file.output.format === "umd" && file.output.file === "plugins/yaml.js") {
replaceModule.push({
module: path.join(PROJECT_ROOT, file.input),
text: 'export * from "../language-yaml/index.js";',
});
}
const { buildOptions } = file;
const shouldMinify =
cliOptions.minify ?? buildOptions.minify ?? file.platform === "universal";