Daydreamer-riri / vite-react-ssg

Static-site generation for React on Vite.
https://vite-react-ssg.netlify.app/
MIT License
125 stars 6 forks source link

server.headers in vite.config.js not work for 'vite-react-ssg dev' #20

Closed er1cw00 closed 4 months ago

er1cw00 commented 4 months ago

I have added COOP and COEP header to vite.config.js, but they do not work on top-level document for 'vite-react-ssg dev'.

` export default defineConfig({

server: {
    headers: {
        'Cross-Origin-Opener-Policy': 'same-origin',
        'Cross-Origin-Embedder-Policy': 'require-corp',
     },
  }

} `

image

Daydreamer-riri commented 4 months ago

Hi @er1cw00 , thank you for pointing this out! The latest version (v0.6.3) has fixed this issue, so you can try it!