Bundle package into dist/prettier/ (#15825)

This commit is contained in:
fisker Cheung authored and GitHub committed 2025-04-09 08:38:46 +08:00
1 parent 004e1e0028
commit 377b231a5d
16 files changed
+82 -54

No files matched your search

+3 -3
View File
@@ -2,8 +2,7 @@ import { createRequire } from "node:module";
import path from "node:path";
import url from "node:url";
import webpack from "webpack";
import files from "../../build/config.js";
import { DIST_DIR } from "../../utils/index.js";
import packageConfig from "../../build/config.js";
function runWebpack(config) {
return new Promise((resolve, reject) => {
@@ -30,6 +29,7 @@ const TEMPORARY_DIRECTORY = url.fileURLToPath(
new URL("./.tmp", import.meta.url),
);
const { distDirectory, files } = packageConfig;
/* `require` in `parser-typescript.js`, #12338 */
for (const file of files) {
if (file.platform !== "universal") {
@@ -39,7 +39,7 @@ for (const file of files) {
const stats = await runWebpack({
mode: "production",
entry: path.join(DIST_DIR, file.output.file),
entry: path.join(distDirectory, file.output.file),
output: {
path: TEMPORARY_DIRECTORY,
filename: `${file.output.file}.[contenthash:7].${