donnikitos / vite-plugin-php

Vite's speed and tooling to preprocess PHP-files!
https://www.npmjs.com/package/vite-plugin-php
MIT License
30 stars 0 forks source link

The "HTML Env Replacement" feature is not work inside the <?php ?> tag #15

Closed ian-ng closed 1 month ago

ian-ng commented 3 months ago

The "HTML Env Replacement" feature is not work inside the <?php ?> tag.

Issue:

// path: index.php <?php $env = "%VITE_ENV%";?>

- Output (Issue)

// path: index.php <?php $env = "%VITE_ENV%";?>


- Expected output

// path: index.php <?php $env = "development";?>

donnikitos commented 3 months ago

Uh, that's an interesting one since the PHP snippets are inserted post compilation 🤔 But I agree - it is definitely a nice feature to have! Will definitely look into it.