79318114

Date: 2024-12-30 16:44:15
Score: 0.5
Natty:
Report link

I use vite-plugin-mkcert for a HTTPS dev server with vite/sveltekit. This plugin handles the certification for you. See npmjs.com/vite-plugin-mkcert

Your vite.config.ts should contain these options:

import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import mkcert from 'vite-plugin-mkcert';

export default defineConfig({
    plugins: [
        sveltekit(),
        mkcert()
    ],
    server: {
        https: {},
        proxy: {}, // workaround to get dev server working
    }
});

I believe others have given answers regarding the secure cookies, but there is also some documentation for working with mobile devices on the plugin page linked earlier.

Reasons:
  • Blacklisted phrase (1): This plugin
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Sam020