vite-plugin-html-env
vite-plugin-html-env copied to clipboard
Plugin incorrectly removes https:// urls
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'
Setting compiler: false fixes the issue