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";
|
||||
|
||||
@@ -761,11 +761,6 @@ const nodejsFiles = [
|
||||
find: "const readBuffer = new Buffer(this.options.readChunk);",
|
||||
replacement: "const readBuffer = Buffer.alloc(this.options.readChunk);",
|
||||
},
|
||||
{
|
||||
module: getPackageFile("js-yaml/dist/js-yaml.mjs"),
|
||||
find: "var dump = dumper.dump;",
|
||||
replacement: "var dump;",
|
||||
},
|
||||
// `parse-json` use another copy of `@babel/code-frame`
|
||||
{
|
||||
module: require.resolve("@babel/code-frame", {
|
||||
|
||||
Reference in new issue
Block a user