donnikitos / vite-plugin-php

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

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

Closed ian-ng closed 4 months ago

ian-ng commented 7 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 7 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.