vite-plugin-html-env icon indicating copy to clipboard operation
vite-plugin-html-env copied to clipboard

Cannot use or set qualifier

Open pate313373 opened this issue 2 years ago • 0 comments

Hi,

thanks for you plugin! I've got "vite-plugin-html-env": "^1.2.7" in my package.json and notices the following:

With this in config:

VitePluginHtmlEnv({
			// prefix: '{{',
			// suffix: '}}',
			compiler: true,
		}),

and this index.html

<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="/favicon.ico">
    <title>import.meta.env.VITE_APP_TITLE</title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but import.meta.env.VITE_APP_TITLE doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>

Everything is working. However, I would have expected to use '<{' and '}>' as qualifiers. If I uncomment prefix and suffix in my above config, I also cannot use '{{' and '}}'. Still the index.html must remain like above to work.

Am I doing anything wrong, or is there a glitch?

Many thanks

pate313373 avatar Feb 04 '23 18:02 pate313373