You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
这是vite-plugin-mkcert 遇上 vite.config.ts文件里面的server.https: true时, 没有mkcert https证书所导致的问题,
一些人建议更改vite.config.ts文件里面的server.https值为false, 其实, 更优雅的做法是:
直接在命令行启动参数增加 --https false 即可, 例如:
yarn dev --https false
pnpm dev --https false
cnpm dev --https false
npm dev --https false
或者你修改package.json里面的scripts dev脚本也行
{
"scripts": {
//其他配置...
"dev": "vite --https false",
// 其他配置...
}
}
Beta Was this translation helpful? Give feedback.
All reactions