Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid certificate #6

Open
cyril-tl opened this issue Nov 30, 2022 · 0 comments
Open

Invalid certificate #6

cyril-tl opened this issue Nov 30, 2022 · 0 comments

Comments

@cyril-tl
Copy link

cyril-tl commented Nov 30, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant