aem-vite / vite-aem-plugin

A proxy server and starter kit for using Vite with Adobe Experience Manager.
https://aemvite.dev/guide/front-end/vite-plugin/
Apache License 2.0
10 stars 2 forks source link

Wrong charset of changed HTML #8

Closed dfranek-pix closed 7 months ago

dfranek-pix commented 7 months ago

Describe the bug

When the HTML is modified the Content-Type header is missing the charset. This leads to an incorrect rendering of the page: grafik

The error is in this line: https://github.com/aem-vite/vite-aem-plugin/blob/cbc7c413b321d519acdfb0bb2aeb0887e2cebf65/src/helpers.ts#L156

This should be changed to text/html;charset=utf-8 (or whatever the server sends)

This error also exists in the version for Vite 4, if possible it would be great if it cloud be fixed there also.

cshawaus commented 7 months ago

@dfranek-pix Thanks for raising this issue. This is fixed in v5.0.3.