Skip to content

Invalid certificate #6

Open
Open
@cyril-tl

Description

@cyril-tl

I get this error :

Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('https://127.0.0.1:5173/src/') with script ('https://127.0.0.1:5173/src/sw.ts'): An SSL certificate error occurred when fetching the script.

And this is my vite.config.ts file :
`
import { fileURLToPath, URL } from "node:url";

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import basicSsl from '@vitejs/plugin-basic-ssl'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
basicSsl()
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
server: {
https: true
},
});
`

Also, I have vue 3.2.45 and vite 3.2.4.
And I launch the dev server with the command
npm run dev -- --https

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions