We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59e123f commit 3ecefc9Copy full SHA for 3ecefc9
bin/format-php-prettier.js
@@ -11,6 +11,9 @@
11
import prettier from "prettier";
12
import prettierConfig from "@ideasonpurpose/prettier-config" with { type: "json" };
13
14
+// Add dynamic import for the plugin
15
+const phpPlugin = (await import("@prettier/plugin-php")).default;
16
+
17
import { readFile, writeFile } from "fs/promises";
18
import { resolve, basename } from "path";
19
@@ -157,6 +160,7 @@ async function formatHTMLThenPHP(filepath) {
157
160
...phpOptions,
158
161
parser: "php",
159
162
embeddedLanguageFormatting: "auto",
163
+ plugins: [phpPlugin], // Explicitly pass the plugin
164
});
165
166
await writeFile(filepath, phpFormatted, "utf8");
0 commit comments