vite-plugin-php 1.0.69 → 1.0.70
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/README.md +1 -0
- package/dist/router.php +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ Check out the [starter repo](https://github.com/nititech/php-vite-starter) for a
|
|
|
22
22
|
|
|
23
23
|
| Version | Feature |
|
|
24
24
|
| ------- | ----------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| 1.0.70 | Added include path override for relative PHP imports in dev mode |
|
|
25
26
|
| 1.0.69 | Using new token format to escape PHP in HTML |
|
|
26
27
|
| 1.0.68 | Improved transpiled code evaluation (removed native `eval()`) |
|
|
27
28
|
| 1.0.67 | Removed whitespaces from PHP responses in dev mode |
|
package/dist/router.php
CHANGED
|
@@ -13,6 +13,15 @@ $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
|
|
|
13
13
|
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME'];
|
|
14
14
|
$_SERVER['QUERY_STRING'] = http_build_query($_GET);
|
|
15
15
|
|
|
16
|
+
ini_set(
|
|
17
|
+
'include_path',
|
|
18
|
+
implode(PATH_SEPARATOR, [
|
|
19
|
+
dirname($_SERVER['SCRIPT_FILENAME']),
|
|
20
|
+
$_SERVER['DOCUMENT_ROOT'],
|
|
21
|
+
ini_get('include_path'),
|
|
22
|
+
]),
|
|
23
|
+
);
|
|
24
|
+
|
|
16
25
|
$source = file_get_contents($sourceFile);
|
|
17
26
|
|
|
18
27
|
$tokensFile = "$sourceFile.json";
|