vitejs / vitejs/vite-plugin-basic-ssl
Invalid certificate
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 517
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the certificate error with the shown vite.config.ts and the npm run dev -- --https command, focusing on the basic SSL plugin and ServiceWorker registration at the reported scope. Done means the development server's certificate is accepted by the browser and the ServiceWorker script registers without the SSL error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- devops, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100