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:
1 parent
8860046468
commit
38dc5dee18
8 files changed
+46
-29
No files matched your search
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user