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

Plugin incorrectly removes https:// urls

Open minht11 opened this issue 3 years ago • 1 comments

Given input like this

<!DOCTYPE html>
<html>
  <head>
    <base href="/" />
    <meta charset="UTF-8" />
    <meta
      http-equiv="Content-Security-Policy"
      content="
        default-src 'self' 'unsafe-inline';
        img-src 'self' https://img.youtube.com;
        frame-src 'self' https://www.youtube-nocookie.com;
        connect-src 'self'
      "
    />
  </head>
  <body>
    <div id="app"></div>
  </body>
</html>

Even without using any env variables, just base plugin https links are removed with the output of this

 default-src 'self' 'unsafe-inline'; img-src 'self' https: frame-src 'self' https: connect-src 'self' 

minht11 avatar Aug 09 '22 09:08 minht11

Setting compiler: false fixes the issue

minht11 avatar Aug 29 '22 09:08 minht11