diff --git a/vite.config.ts b/vite.config.ts index 98bf423..0a725af 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,10 +5,23 @@ import fs from 'node:fs'; export default defineConfig(({mode}) => ({ plugins: [ react(), + { + name: 'add-nonce-back', + transformIndexHtml(html) { + const nonce = '**MY_PRETTY_CSP_NONCE**'; + return html.replace( + //, + (match) => { + return `