I'm having trouble getting vite-plugin-php to work with my Vite setup (version 5.1.4). Despite following the plugin's documentation and configuring my vite.config.js as shown below, it doesn't seem to function as expected. My project structure is straightforward with a single index.php file in the src directory, and I've directed the plugin to use a specific PHP binary.
Here's my vite.config.js:
import path from "path";
import { defineConfig } from "vite";
import usePHP from "vite-plugin-php";
export default defineConfig({
plugins: [
usePHP({
binary: "/opt/homebrew/bin/php",
entry: ["index.php"],
}),
],
root: path.resolve(__dirname, "src"),
});
And my project structure:
Could anyone point out what might be wrong with this configuration or suggest any steps to troubleshoot this issue?
I'm having trouble getting
vite-plugin-phpto work with my Vite setup (version 5.1.4). Despite following the plugin's documentation and configuring myvite.config.jsas shown below, it doesn't seem to function as expected. My project structure is straightforward with a singleindex.phpfile in thesrcdirectory, and I've directed the plugin to use a specific PHP binary.Here's my
vite.config.js:And my project structure:
Could anyone point out what might be wrong with this configuration or suggest any steps to troubleshoot this issue?