basicSsl() removal ; Commenting CSP in index.html for dev

This commit is contained in:
LC mac
2026-02-19 23:39:49 +08:00
parent f1b0c0738e
commit 02f58f5ef0
3 changed files with 30 additions and 9 deletions

View File

@@ -17,8 +17,9 @@ export default defineConfig({
plugins: [
wasm(),
topLevelAwait(),
basicSsl(),
react(),
// basicSsl() plugin removed - it was causing MIME type issues with raw imports
// Enable only when specifically needed for HTTPS development
{
name: 'html-transform',
transformIndexHtml(html) {
@@ -27,11 +28,17 @@ export default defineConfig({
}
],
server: {
host: '0.0.0.0',
port: 5173,
strictPort: true,
https: true,
headers: {
'Content-Security-Policy': '', // Empty CSP for dev
},
},
preview: {
headers: {
'Content-Security-Policy': '', // Empty for preview too
},
},
resolve: {
alias: {
buffer: 'buffer',