When trying to use custom cert and key for https, I added https: { key: "./localhost-key.pem", cert: "./localhost-cert.pem" } to .umirc. Umi throws the following error
Invalid config keys: https
https://github.com/khalibloo/umi-https-bug
Steps to reproduce the behavior:
HTTPS=1Expected behavior
hi @khalibloo try this into .umirc.ts file
devServer:{
https: { key: "./localhost-key.pem", cert: "./localhost-cert.pem" }
},
That worked wonders! Thanks.
It was this part of the documentation that misled me https://umijs.org/docs/env-variables#https Needs to be updated.
Your welcome!
Yes, documentation it's poor... had the same problem and i found into src\.umi\core\pluginConfig.d.ts how to overwrite some configurations
I thought there was an issue with my intellisense, but now that you mention it, I checked and the typings aren't properly set for .umirc.ts defineConfig. The type is set to any. There is no point using defineConfig anymore.