-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[fix] Custom HTTPS files results in error:0909006C:PEM routines:get_name:no start line #1798
Conversation
…PEM routines:get_name:no start line
…into vite-custom-https-fix
|
@@ -1,5 +1,6 @@ | |||
import http from 'http'; | |||
import https from 'https'; | |||
import fs from 'fs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd probably be nice to add a blank line after this one for style consistency
This would need a changeset It'd be nice to know if this was always broken or broke recently. Maybe a Vite upgrade broke it? I wonder if it works with an older version of Vite |
I'm not sure I follow — Vite isn't involved in this process, the code changed in this PR is SvelteKit's own helper for starting an http/https server. Did this work in a previous version? I'd be inclined to keep the current behaviour — it's easy to do |
@ryc76 can you explain what the breakage was? I'm not seeing that the referenced PR did anything with either of those options |
I've revisited and can't get this working with older commits as I thought I could. I'm happy to go with @Rich-Harris suggestion of using fs.readFileSync inside the svelte.config.js |
Specifying HTTPS key pair in Vite config fails causes dev server to fail
example config
Run npx svelte-kit dev --https
Results in
error:0909006C:PEM routines:get_name:no start line
Vite was being passed the path of the files rather the file themselves.
Odd as I'm sure this used to work.