vite-plugin-php 2.0.2 → 2.0.4
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 +15 -0
- package/dist/index.cjs +6617 -5972
- package/dist/index.d.cts +4 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +6616 -5971
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -179,6 +179,21 @@ usePHP({
|
|
|
179
179
|
});
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
+
Since version 2.0.4 it is possible to point to some external files. Make sure the change URL points to an external origin:
|
|
183
|
+
|
|
184
|
+
```js
|
|
185
|
+
usePHP({
|
|
186
|
+
rewriteUrl(requestUrl) {
|
|
187
|
+
if (requestUrl.pathname.startsWith('/media/')) {
|
|
188
|
+
return new URL(
|
|
189
|
+
'https://nititech.de' +
|
|
190
|
+
requestUrl.toString().substring(requestUrl.origin.length),
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
182
197
|
⚠️ **Attention:** If using the rewriteUrl property you will need to exclude (_return undefined_) assets like CSS, JavaScript, Images, etc.., that match your transpiled php file names, on your own!
|
|
183
198
|
|
|
184
199
|
#### Error logging
|