vite-plugin-php 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -118,7 +118,8 @@ function usePHP(cfg = {}) {
|
|
|
118
118
|
configureServer(server) {
|
|
119
119
|
server.middlewares.use(async (req, res, next) => {
|
|
120
120
|
if (req.url) {
|
|
121
|
-
|
|
121
|
+
const url = new URL(req.url, "http://localhost");
|
|
122
|
+
let requestUrl = url.pathname;
|
|
122
123
|
if (requestUrl.endsWith("/")) {
|
|
123
124
|
requestUrl += "index.php";
|
|
124
125
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -116,7 +116,8 @@ function usePHP(cfg = {}) {
|
|
|
116
116
|
configureServer(server) {
|
|
117
117
|
server.middlewares.use(async (req, res, next) => {
|
|
118
118
|
if (req.url) {
|
|
119
|
-
|
|
119
|
+
const url = new URL(req.url, "http://localhost");
|
|
120
|
+
let requestUrl = url.pathname;
|
|
120
121
|
if (requestUrl.endsWith("/")) {
|
|
121
122
|
requestUrl += "index.php";
|
|
122
123
|
}
|