Open rottmann opened 1 month ago
Hi @rottmann,
thanks for the submission!
The Vite root
-parameter is already earmarked in issue #10 - so it's on it's way :)
Can you clarify your use case with the namespace? As far as I understand you have a namespaced module with imports in it and during trasnpilation the imports are being set to the top of the file?
One case is a custom autoloader, that uses namespaces. Pages / Layouts are in namespaces and the autoloader include the e.g. the layouts within pages. Only direct includes work currently.
A download page could only be done, if it includes only the download functionality (header() ...) and is not allowed to respond a custom page, e.g. if the user is not allowed to download.
For this, it must be used a redirect workaround, that redirects to a separate page (because of the js/css headers).
So we need a download.php
and a download-not-allowed.php
with the HTML response.
Cause the generated code looks like
namespace must be first.
A workaround could be a placeholder, that we can set within our code and vite-plugin-php insert (if it exists) at the placeholder.
And it would be great, if it could work with vites root parameter.